Skip to content

Commit

Permalink
fix(anchor): fix wrong font issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Bien committed Jan 11, 2021
1 parent 72cf358 commit bab2a29
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Typography/Anchor.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
import React, { useContext } from 'react';
import { Text as NativeText, StyleProp, TextStyle } from 'react-native';

import { Text } from '..';
import { ThemeContext } from '../common/theming/Theme';

type Props = React.ComponentProps<typeof NativeText> & {
children: React.ReactNode;
style?: StyleProp<TextStyle>;
type Props = React.ComponentProps<typeof Text> & {
underline?: boolean;
};

const Anchor = ({ underline = false, children, style, ...rest }: Props) => {
const theme = useContext(ThemeContext);

return (
<NativeText
<Text
style={[
{
color: theme.anchor,
textDecorationLine: underline ? 'underline' : 'none',
fontSize: 16,
},
style,
]}
{...rest}
>
{children}
</NativeText>
</Text>
);
};

Expand Down

0 comments on commit bab2a29

Please sign in to comment.