add card to notification
This commit is contained in:
@@ -6,7 +6,13 @@ import {StarterPackIcon} from '#/components/icons/StarterPackIcon'
|
|||||||
import {Link} from '#/components/Link'
|
import {Link} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
export function StarterPackCard({hideTopBorder}: {hideTopBorder?: boolean}) {
|
export function StarterPackCard({
|
||||||
|
type,
|
||||||
|
hideTopBorder,
|
||||||
|
}: {
|
||||||
|
hideTopBorder?: boolean
|
||||||
|
type: 'list' | 'notification'
|
||||||
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -15,13 +21,14 @@ export function StarterPackCard({hideTopBorder}: {hideTopBorder?: boolean}) {
|
|||||||
style={[
|
style={[
|
||||||
a.flex_row,
|
a.flex_row,
|
||||||
a.w_full,
|
a.w_full,
|
||||||
!hideTopBorder && a.border_t,
|
|
||||||
a.px_xl,
|
a.px_xl,
|
||||||
a.py_lg,
|
a.py_lg,
|
||||||
a.gap_md,
|
a.gap_md,
|
||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
|
!hideTopBorder && type !== 'notification' && a.border_t,
|
||||||
|
type === 'notification' && [a.mt_sm, a.py_md, a.border, a.rounded_sm],
|
||||||
]}>
|
]}>
|
||||||
<StarterPackIcon width={36} height={36} />
|
{type === 'notification' && <StarterPackIcon width={36} height={36} />}
|
||||||
<View style={a.gap_md}>
|
<View style={a.gap_md}>
|
||||||
<View>
|
<View>
|
||||||
<Text style={[a.font_bold, a.text_md]}>Science</Text>
|
<Text style={[a.font_bold, a.text_md]}>Science</Text>
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import {PreviewableUserAvatar, UserAvatar} from '../util/UserAvatar'
|
|||||||
|
|
||||||
import hairlineWidth = StyleSheet.hairlineWidth
|
import hairlineWidth = StyleSheet.hairlineWidth
|
||||||
import {StarterPackIcon} from '#/components/icons/StarterPackIcon'
|
import {StarterPackIcon} from '#/components/icons/StarterPackIcon'
|
||||||
|
import {StarterPackCard} from '#/components/StarterPack/StarterPackCard'
|
||||||
|
|
||||||
const MAX_AUTHORS = 5
|
const MAX_AUTHORS = 5
|
||||||
|
|
||||||
@@ -305,7 +306,9 @@ let FeedItem = ({
|
|||||||
showLikes
|
showLikes
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{item.type === 'starter-pack-signup' ? <></> : null}
|
{item.type === 'starter-pack-signup' ? (
|
||||||
|
<StarterPackCard type="notification" />
|
||||||
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user