1b0fbd503e
* remove use of flatten where possible * restore flatten where it says it's needed * missing utils alpha
41 lines
870 B
TypeScript
41 lines
870 B
TypeScript
import {View} from 'react-native'
|
|
|
|
import {
|
|
atoms as a,
|
|
type TextStyleProp,
|
|
useTheme,
|
|
type ViewStyleProp,
|
|
} from '#/alf'
|
|
import {type Props} from '#/components/icons/common'
|
|
import {type Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth'
|
|
|
|
export function IconCircle({
|
|
icon: Icon,
|
|
size = 'xl',
|
|
style,
|
|
iconStyle,
|
|
}: ViewStyleProp & {
|
|
icon: typeof Growth
|
|
size?: Props['size']
|
|
iconStyle?: TextStyleProp['style']
|
|
}) {
|
|
const t = useTheme()
|
|
|
|
return (
|
|
<View
|
|
style={[
|
|
a.justify_center,
|
|
a.align_center,
|
|
a.rounded_full,
|
|
{
|
|
width: size === 'lg' ? 52 : 64,
|
|
height: size === 'lg' ? 52 : 64,
|
|
backgroundColor: t.palette.primary_50,
|
|
},
|
|
style,
|
|
]}>
|
|
<Icon size={size} style={[{color: t.palette.primary_500}, iconStyle]} />
|
|
</View>
|
|
)
|
|
}
|