Skip to content

Commit

Permalink
Merge pull request #802 from gympass/DS-837
Browse files Browse the repository at this point in the history
[DS-837] Add flex typing
  • Loading branch information
matheushdsbr authored May 28, 2024
2 parents d30b838 + 5fb911c commit 68b66d6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { compose, generator, getSpacing } from './theme';
import { compose, generator, getSpacing } from '../theme';

import { toPx } from './unit';
import { toPx } from '../unit';

const flexDirection = props =>
generator({
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions packages/system/src/flex/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './flex';
export type { Flex } from './types';
20 changes: 20 additions & 0 deletions packages/system/src/flex/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { spacing } from '@gympass/yoga-tokens';

type GapValues = typeof spacing | string | number;

export type Flex = {
flexDirection?: string;
alignItems?: string;
alignContent?: string;
alignSelf?: string;
justifyContent?: string;
justifySelf?: string;
flex?: string | number;
flexBasis?: string;
flexFlow?: string;
flexGrow?: string | number;
flexShrink?: string;
flexWrap?: string;
order?: string | number;
gap?: GapValues;
};

0 comments on commit 68b66d6

Please sign in to comment.