From a950a44b5f279bae3d30539100431714cd2e2985 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 19 Dec 2023 11:48:34 -0600 Subject: [PATCH] Add a few more common macros --- src/alf/themes.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/alf/themes.ts b/src/alf/themes.ts index fe7cfc2b24..55f1904c6c 100644 --- a/src/alf/themes.ts +++ b/src/alf/themes.ts @@ -123,7 +123,8 @@ export const light = createTheme({ /** Shorthand for `flexDirection: 'row'` */ row: (_: boolean) => ({flexDirection: 'row', flex: 1}), /** - * Shorthand for `flex: 1`. + * Shorthand for `flex: 1`. Optionally pass an integer to specify the + * col-span. * * Semantically this is helpful as a direct child of `` * @@ -132,11 +133,20 @@ export const light = createTheme({ * * Hello * + * + * Hello + * * */ column: (span: boolean | number) => ({ flex: typeof span === 'number' ? span : 1, }), + /** Shorthand for `alignItems: 'center'` */ + aic: (_: boolean) => ({alignItems: 'center'}), + /** Shorthand for `justifyContent: 'center'` */ + jcc: (_: boolean) => ({justifyContent: 'center'}), + /** Shorthand for `justifyContent: 'space-between'` */ + jcb: (_: boolean) => ({justifyContent: 'space-between'}), /** Shorthand for `position: 'absolute'` */ abs: (_: boolean) => ({position: 'absolute'}), /** Shorthand for `StyleSheet.absoluteFillObject` */ @@ -157,7 +167,6 @@ export const light = createTheme({ lineHeight: tokens.lineHeight[value], } }, - fontFamily: (fontFamily: string) => ({fontFamily}), }, breakpoints: { /** Greater than 800 */