[Neue] Handle emoji within custom font (#5449)
* Support emoji in text with custom font * Add emoji support to elements that need it * Remove unused file causing lint failure * Fix a few more emoji locations * Couple more * No throw
This commit is contained in:
@@ -44,17 +44,22 @@ export function Avatar({avatar}: {avatar?: string}) {
|
||||
}
|
||||
|
||||
export function Title({value}: {value: string}) {
|
||||
return <Text style={[a.text_md, a.font_bold, a.leading_tight]}>{value}</Text>
|
||||
return (
|
||||
<Text emoji style={[a.text_md, a.font_bold, a.leading_tight]}>
|
||||
{value}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
|
||||
export function Description({value, handle}: {value?: string; handle: string}) {
|
||||
const {_} = useLingui()
|
||||
return value ? (
|
||||
<Text numberOfLines={2}>
|
||||
<RichText value={value} style={[a.leading_snug]} />
|
||||
</Text>
|
||||
) : (
|
||||
<Text style={[a.leading_snug]}>
|
||||
<Trans>By {sanitizeHandle(handle, '@')}</Trans>
|
||||
<Text emoji style={[a.leading_snug]}>
|
||||
{_(msg`By ${sanitizeHandle(handle, '@')}`)}
|
||||
</Text>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user