Skip to content

Commit

Permalink
chore: improved styling
Browse files Browse the repository at this point in the history
  • Loading branch information
displaynone committed Apr 20, 2023
1 parent 82b05bc commit 7068b78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/qr/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const QRScanner: FC = () => {
<Text size="headlineSmall" variant={['bold', 'primary']}>
<Trans>Add a new site</Trans>
</Text>
<Text size="bodyLarge" variant={'secondary'}>
<Text size="bodyLarge" variant={'secondary'} numberOfLines={2}>
<Trans>
Scan your website's 2FA QR code using your device's camera
</Trans>
Expand All @@ -70,7 +70,7 @@ const QRScanner: FC = () => {
ratio="1:1"
/>
</View>
<Text size="bodyMedium" variant={'secondary'}>
<Text size="bodyMedium" variant={'secondary'} numberOfLines={2}>
<Trans>
The QR code can be easily recognized by simply pointing your
device's camera at it
Expand Down
4 changes: 3 additions & 1 deletion src/ui/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ export type TextVariantTypes = (typeof variants)[number];
export type TextProps = {
variant?: TextVariantTypes | TextVariantTypes[];
size?: keyof typeof MD3TypescaleKey;
numberOfLines?: number;
};

const Text: FC<ComponentWithChildren & TextProps> = ({
children,
variant = 'primary',
size,
numberOfLines = 1,
}) => {
const theme = useTheme();
const styles = getStyles(theme);
Expand All @@ -36,7 +38,7 @@ const Text: FC<ComponentWithChildren & TextProps> = ({
<PaperText
style={[styles.common, listOfStiles]}
variant={size}
numberOfLines={1}
numberOfLines={numberOfLines}
>
{children}
</PaperText>
Expand Down

0 comments on commit 7068b78

Please sign in to comment.