Skip to content

Commit

Permalink
Merge pull request #814 from gympass/DS-838
Browse files Browse the repository at this point in the history
[DS-838] - Font-Weight typing
  • Loading branch information
evilamaior authored May 27, 2024
2 parents 23ecccc + 512ae21 commit 4ff9153
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFontWeight, generator } from './theme';
import { getFontWeight, generator } from '../theme';

export const fontWeight = props =>
generator({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getFontWeight, generator } from './theme';
import { getFontWeight, generator } from '../theme';

export const fontWeight = props =>
generator({
Expand Down
2 changes: 2 additions & 0 deletions packages/system/src/font-weight/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './fontWeight';
export type { FontWeights } from './types';
8 changes: 8 additions & 0 deletions packages/system/src/font-weight/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { fontWeights } from '@gympass/yoga-tokens';

type FontWeightsValues = typeof fontWeights | string | number;

export type FontWeights = {
fontWeight?: FontWeightsValues;
fw?: FontWeightsValues;
};
2 changes: 1 addition & 1 deletion packages/system/src/typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
compose,
} from './theme';

import { fontWeight } from './fontWeight';
import { fontWeight } from './font-weight';

const color = props =>
generator({
Expand Down
2 changes: 1 addition & 1 deletion packages/system/src/typography.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
textTransform,
} from './typography';

import { fontWeight as fontWeightAndroid } from './fontWeight.android';
import { fontWeight as fontWeightAndroid } from './font-weight/fontWeight.android';

const fontSizes = [10, 20, 40];

Expand Down

0 comments on commit 4ff9153

Please sign in to comment.