ci: typecheck on push
This commit is contained in:
parent
3c407248a7
commit
144a2cd227
17 changed files with 2345 additions and 1 deletions
40
src/components/Chip.tsx
Normal file
40
src/components/Chip.tsx
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import { ReactNode } from 'react'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
import { colors, radius, spacing } from '../lib/theme'
|
||||
|
||||
interface ChipProps {
|
||||
children: ReactNode
|
||||
accent?: boolean
|
||||
}
|
||||
|
||||
export default function Chip({ children, accent }: ChipProps) {
|
||||
return (
|
||||
<View style={[styles.chip, accent && styles.chipAccent]}>
|
||||
<Text style={[styles.text, accent && styles.textAccent]}>{children}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
chip: {
|
||||
backgroundColor: colors.surfaceRaised,
|
||||
borderWidth: StyleSheet.hairlineWidth,
|
||||
borderColor: colors.border,
|
||||
paddingHorizontal: spacing(3),
|
||||
paddingVertical: spacing(1.5),
|
||||
borderRadius: radius.full,
|
||||
alignSelf: 'flex-start',
|
||||
},
|
||||
chipAccent: {
|
||||
backgroundColor: colors.accent,
|
||||
borderColor: colors.accent,
|
||||
},
|
||||
text: {
|
||||
color: colors.textDim,
|
||||
fontSize: 12,
|
||||
fontWeight: '600',
|
||||
},
|
||||
textAccent: {
|
||||
color: colors.text,
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue