Skip to content

Commit

Permalink
Update style object types to use CSSProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Feb 14, 2022
1 parent 91109e1 commit f0cbeff
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions packages/style-engine/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
/**
* External dependencies
*/
import type { CSSProperties } from 'react';

export type Box = {
top?: string;
right?: string;
bottom?: string;
left?: string;
top?: CSSProperties[ 'top' ];
right?: CSSProperties[ 'right' ];
bottom?: CSSProperties[ 'bottom' ];
left?: CSSProperties[ 'left' ];
};

export interface Style {
spacing?: {
margin?: string | Box;
padding?: string | Box;
margin?: CSSProperties[ 'margin' ] | Box;
padding?: CSSProperties[ 'padding' ] | Box;
};
typography?: {
fontSize?: string;
fontFamily?: string;
fontWeight?: string;
fontStyle?: string;
letterSpacing?: string;
lineHeight?: string;
textDecoration?: string;
textTransform?: string;
fontSize?: CSSProperties[ 'fontSize' ];
fontFamily?: CSSProperties[ 'fontFamily' ];
fontWeight?: CSSProperties[ 'fontWeight' ];
fontStyle?: CSSProperties[ 'fontStyle' ];
letterSpacing?: CSSProperties[ 'letterSpacing' ];
lineHeight?: CSSProperties[ 'lineHeight' ];
textDecoration?: CSSProperties[ 'textDecoration' ];
textTransform?: CSSProperties[ 'textTransform' ];
};
}

Expand Down

0 comments on commit f0cbeff

Please sign in to comment.