Skip to content

Commit

Permalink
fix: refactor text component to update infer values
Browse files Browse the repository at this point in the history
  • Loading branch information
tcK1 committed Jan 23, 2024
1 parent 3770306 commit efe3329
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 64 deletions.
33 changes: 1 addition & 32 deletions packages/yoga/src/Text/index.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
import {
Text,
H1,
H2,
H3,
H4,
H5,
Small,
Tiny,
Light,
Regular,
Medium,
Bold,
Black,
SectionTitle,
SmallestException,
} from './web';

Text.H1 = H1;
Text.H2 = H2;
Text.H3 = H3;
Text.H4 = H4;
Text.H5 = H5;
Text.Small = Small;
Text.Tiny = Tiny;
Text.Light = Light;
Text.Regular = Regular;
Text.Medium = Medium;
Text.Bold = Bold;
Text.Black = Black;
Text.SectionTitle = SectionTitle;
Text.SmallestException = SmallestException;
import { Text } from './web';

export default Text;
33 changes: 1 addition & 32 deletions packages/yoga/src/Text/index.native.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
import {
Text,
H1,
H2,
H3,
H4,
H5,
Small,
Tiny,
Light,
Regular,
Medium,
Bold,
Black,
SectionTitle,
SmallestException,
} from './native';

Text.H1 = H1;
Text.H2 = H2;
Text.H3 = H3;
Text.H4 = H4;
Text.H5 = H5;
Text.Small = Small;
Text.Tiny = Tiny;
Text.Light = Light;
Text.Regular = Regular;
Text.Medium = Medium;
Text.Bold = Bold;
Text.Black = Black;
Text.SectionTitle = SectionTitle;
Text.SmallestException = SmallestException;
import { Text } from './native';

export default Text;
15 changes: 15 additions & 0 deletions packages/yoga/src/Text/native/Text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ const Text = props => <TextRenderer {...props} />;

Text.displayName = 'Text';

Text.H1 = H1;
Text.H2 = H2;
Text.H3 = H3;
Text.H4 = H4;
Text.H5 = H5;
Text.Small = Small;
Text.Tiny = Tiny;
Text.Light = Light;
Text.Regular = Regular;
Text.Medium = Medium;
Text.Bold = Bold;
Text.Black = Black;
Text.SectionTitle = SectionTitle;
Text.SmallestException = SmallestException;

const fontSizes = oneOf([
'xxsmall',
'xsmall',
Expand Down
15 changes: 15 additions & 0 deletions packages/yoga/src/Text/web/Text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ const Text = props => <TextRenderer {...props} />;

Text.displayName = 'Text';

Text.H1 = H1;
Text.H2 = H2;
Text.H3 = H3;
Text.H4 = H4;
Text.H5 = H5;
Text.Small = Small;
Text.Tiny = Tiny;
Text.Light = Light;
Text.Regular = Regular;
Text.Medium = Medium;
Text.Bold = Bold;
Text.Black = Black;
Text.SectionTitle = SectionTitle;
Text.SmallestException = SmallestException;

const fontSizes = oneOf([
'xxsmall',
'xsmall',
Expand Down

0 comments on commit efe3329

Please sign in to comment.