Files
bsky-social-app/src/components/IconCircle.tsx
T
Eric Bailey 74186950b2 [ALF] Theme & palette cleanup (#4769)
* Invert primary scale

* Invert negative palette

* Replace theme specific styles in Toggle

* Remove theme specific colors from Button, improves secondary solid on dark mode

* TextField

* Remove from MessageItem

* Threadgate editor

* IconCircle

* Muted words

* Generate themes from hues

* Cleanup

* Deprecate more values, fix circular import

* Invert positive too, hardly use

* Button tweaks, some theme diffs

* Match disabled state for negative button

* Fix unread noty bg
2024-07-11 16:59:12 -05:00

51 lines
983 B
TypeScript

import React from 'react'
import {View} from 'react-native'
import {
atoms as a,
flatten,
TextStyleProp,
useTheme,
ViewStyleProp,
} from '#/alf'
import {Props} from '#/components/icons/common'
import {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,
},
flatten(style),
]}>
<Icon
size={size}
style={[
{
color: t.palette.primary_500,
},
flatten(iconStyle),
]}
/>
</View>
)
}