Skip to content

Commit

Permalink
Merge pull request #823 from gympass/DS-850
Browse files Browse the repository at this point in the history
🐞fix[tokens/system]: Adjust export breakpoints types
  • Loading branch information
evilamaior authored May 28, 2024
2 parents 9ceee51 + 556aaff commit 789824a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
4 changes: 1 addition & 3 deletions packages/helpers/src/hide.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import tokens, { BreakpointsType } from '@gympass/yoga-tokens';

const { breakpoints } = tokens;
import { breakpoints, BreakpointsType } from '@gympass/yoga-tokens';

import { css } from 'styled-components';

Expand Down
4 changes: 1 addition & 3 deletions packages/helpers/src/media.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/* eslint-disable import/no-named-as-default-member */
import tokens, { BreakpointsKey } from '@gympass/yoga-tokens';
import { breakpoints, BREAKPOINTS_KEYS, BreakpointsKey } from '@gympass/yoga-tokens';

import media, { matcher, not } from './media';
import { Matcher } from './types';

const { breakpoints, BREAKPOINTS_KEYS } = tokens;

const formatCss = style =>
Array.isArray(style)
? style.join().replace(/,|\s*/g, '')
Expand Down
4 changes: 1 addition & 3 deletions packages/helpers/src/media.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import tokens, { BreakpointsKey } from '@gympass/yoga-tokens';
import { breakpoints, BREAKPOINTS_KEYS, BreakpointsKey } from '@gympass/yoga-tokens';

import { css } from 'styled-components';

import hide from './hide';
import { Matcher, Media, Width } from './types';

const { breakpoints, BREAKPOINTS_KEYS } = tokens;

const availableBreakpoints = BREAKPOINTS_KEYS as BreakpointsKey[];

const media: Media = { not: {} } as Media;
Expand Down
2 changes: 1 addition & 1 deletion packages/helpers/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BreakpointsKey} from '@gympass/yoga-tokens';
import { BreakpointsKey } from '@gympass/yoga-tokens';

import { CSSObject, FlattenSimpleInterpolation } from 'styled-components';
export type Width = BreakpointsKey | BreakpointsKey[];
Expand Down
6 changes: 3 additions & 3 deletions packages/tokens/src/global/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import borders from './borders';
import breakpoints, { BREAKPOINTS_KEYS } from './breakpoints';
import breakpoints from './breakpoints';
import colors from './colors';
import fonts from './fonts';
import fontSizes from './font-sizes';
Expand All @@ -13,7 +13,6 @@ import transition from './transition';
const tokens = {
borders,
breakpoints,
BREAKPOINTS_KEYS,
colors,
fonts,
fontSizes,
Expand All @@ -29,7 +28,6 @@ export {
tokens as default,
borders,
breakpoints,
BREAKPOINTS_KEYS,
colors,
fonts,
fontSizes,
Expand All @@ -40,3 +38,5 @@ export {
spacing,
transition,
};

export * from './breakpoints';
3 changes: 1 addition & 2 deletions packages/tokens/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import tokens from './global';
import znCn from './locale/zn-cn';
import { BreakpointsKey, BreakpointsType } from './global/breakpoints';

export { tokens as default, znCn, BreakpointsKey, BreakpointsType };
export { tokens as default, znCn };
export * from './global';

0 comments on commit 789824a

Please sign in to comment.