Rework the visual design of the interests card in explore (#8135)
This commit is contained in:
@@ -8,6 +8,7 @@ import {usePreferencesQuery} from '#/state/queries/preferences'
|
|||||||
import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
|
import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
|
import {Shapes_Stroke2_Corner0_Rounded as Shapes} from '#/components/icons/Shapes'
|
||||||
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
||||||
import {Link} from '#/components/Link'
|
import {Link} from '#/components/Link'
|
||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
@@ -52,19 +53,20 @@ export function ExploreInterestsCard() {
|
|||||||
onConfirm={onConfirmClose}
|
onConfirm={onConfirmClose}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<View style={[a.p_lg, a.pb_2xs]}>
|
<View style={[a.pb_2xs]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.p_lg,
|
a.p_lg,
|
||||||
a.rounded_md,
|
a.border_b,
|
||||||
a.border,
|
a.gap_md,
|
||||||
a.gap_sm,
|
|
||||||
t.atoms.border_contrast_medium,
|
t.atoms.border_contrast_medium,
|
||||||
t.atoms.bg_contrast_25,
|
|
||||||
]}>
|
]}>
|
||||||
<Text style={[a.text_md, a.font_bold, a.leading_tight]}>
|
<View style={[a.flex_row, a.gap_sm, a.align_center]}>
|
||||||
<Trans>Your interests</Trans>
|
<Shapes />
|
||||||
</Text>
|
<Text style={[a.text_xl, a.font_bold, a.leading_tight]}>
|
||||||
|
<Trans>Your interests</Trans>
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
{preferences?.interests?.tags &&
|
{preferences?.interests?.tags &&
|
||||||
preferences.interests.tags.length > 0 ? (
|
preferences.interests.tags.length > 0 ? (
|
||||||
@@ -76,12 +78,11 @@ export function ExploreInterestsCard() {
|
|||||||
a.justify_center,
|
a.justify_center,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
a.rounded_full,
|
a.rounded_full,
|
||||||
a.border,
|
t.atoms.bg_contrast_25,
|
||||||
t.atoms.border_contrast_medium,
|
|
||||||
a.px_lg,
|
a.px_lg,
|
||||||
{height: 32},
|
{height: 32},
|
||||||
]}>
|
]}>
|
||||||
<Text style={[a.text_sm, t.atoms.text_contrast_medium]}>
|
<Text style={[a.text_sm, t.atoms.text_contrast_high]}>
|
||||||
{interestsDisplayNames[tag]}
|
{interestsDisplayNames[tag]}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -89,10 +90,8 @@ export function ExploreInterestsCard() {
|
|||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Text style={[a.text_sm, a.leading_snug, a.pb_xs]}>
|
<Text style={[a.text_sm, a.leading_snug]}>
|
||||||
<Trans>
|
<Trans>Your interests help us find what you like!</Trans>
|
||||||
Your selected interests help us serve you content you care about.
|
|
||||||
</Trans>
|
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
@@ -110,15 +109,15 @@ export function ExploreInterestsCard() {
|
|||||||
<Button
|
<Button
|
||||||
label={_(msg`Hide this card`)}
|
label={_(msg`Hide this card`)}
|
||||||
size="small"
|
size="small"
|
||||||
variant="solid"
|
variant="ghost"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
shape="round"
|
shape="round"
|
||||||
onPress={onClose}
|
onPress={onClose}
|
||||||
style={[
|
style={[
|
||||||
a.absolute,
|
a.absolute,
|
||||||
{top: a.pt_xs.paddingTop, right: a.pr_xs.paddingRight},
|
{top: a.pt_sm.paddingTop, right: a.pr_sm.paddingRight},
|
||||||
]}>
|
]}>
|
||||||
<ButtonIcon icon={X} />
|
<ButtonIcon icon={X} size="md" />
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user