diff options
author | Hailey <me@haileyok.com> | 2024-02-13 00:40:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 00:40:39 -0800 |
commit | d8245e96eab165d5446254e23e8ae5849354e7e5 (patch) | |
tree | e8b1020e0d9d8a6300e9d214d7c70a3006646357 /src/components/IconCircle.tsx | |
parent | 36e1da10069749832831569611df8038c43fb6ed (diff) | |
download | voidsky-d8245e96eab165d5446254e23e8ae5849354e7e5.tar.zst |
Add copy to feeds page (#2852)
* move `IconCircle` to `components` for reuse * add copy to feeds page * start of a header * saveit * add lg size * add your feeds * don't show Your Feeds if you don't have any * Minor ui tweaks * cleanup * remove unused activity indicator --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/components/IconCircle.tsx')
-rw-r--r-- | src/components/IconCircle.tsx | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/components/IconCircle.tsx b/src/components/IconCircle.tsx new file mode 100644 index 000000000..aa779e37f --- /dev/null +++ b/src/components/IconCircle.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import {View} from 'react-native' + +import { + useTheme, + atoms as a, + ViewStyleProp, + TextStyleProp, + flatten, +} from '#/alf' +import {Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' +import {Props} from '#/components/icons/common' + +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.name === 'light' ? t.palette.primary_50 : t.palette.primary_950, + }, + flatten(style), + ]}> + <Icon + size={size} + style={[ + { + color: t.palette.primary_500, + }, + flatten(iconStyle), + ]} + /> + </View> + ) +} |