Skip to content

Commit

Permalink
feat: flex typing
Browse files Browse the repository at this point in the history
  • Loading branch information
flavia-moraes committed May 15, 2024
1 parent bdf158b commit 9abad67
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
order,
flexes,
gap,
} from './flex';
} from '.';

const spacings = [0, 4, 8, 12];

Expand Down
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
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 tokens from '@gympass/yoga-tokens';

type GapValues = typeof tokens.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 9abad67

Please sign in to comment.