From 6a101309d026a2e86076676780773bf945b1b466 Mon Sep 17 00:00:00 2001 From: Esthefanie Vila Maior Date: Mon, 20 May 2024 18:52:37 +0100 Subject: [PATCH] feat: add font-weight types --- .../fontWeight.android.ts} | 2 +- .../src/{fontWeight.js => font-weight/fontWeight.ts} | 2 +- packages/system/src/font-weight/index.ts | 2 ++ packages/system/src/font-weight/types.ts | 8 ++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) rename packages/system/src/{fontWeight.android.js => font-weight/fontWeight.android.ts} (89%) rename packages/system/src/{fontWeight.js => font-weight/fontWeight.ts} (79%) create mode 100644 packages/system/src/font-weight/index.ts create mode 100644 packages/system/src/font-weight/types.ts diff --git a/packages/system/src/fontWeight.android.js b/packages/system/src/font-weight/fontWeight.android.ts similarity index 89% rename from packages/system/src/fontWeight.android.js rename to packages/system/src/font-weight/fontWeight.android.ts index 1fe18b66ed..7613253923 100644 --- a/packages/system/src/fontWeight.android.js +++ b/packages/system/src/font-weight/fontWeight.android.ts @@ -1,4 +1,4 @@ -import { getFontWeight, generator } from './theme'; +import { getFontWeight, generator } from '../theme'; export const fontWeight = props => generator({ diff --git a/packages/system/src/fontWeight.js b/packages/system/src/font-weight/fontWeight.ts similarity index 79% rename from packages/system/src/fontWeight.js rename to packages/system/src/font-weight/fontWeight.ts index 7eae82ba98..8b2ab435a0 100644 --- a/packages/system/src/fontWeight.js +++ b/packages/system/src/font-weight/fontWeight.ts @@ -1,4 +1,4 @@ -import { getFontWeight, generator } from './theme'; +import { getFontWeight, generator } from '../theme'; export const fontWeight = props => generator({ diff --git a/packages/system/src/font-weight/index.ts b/packages/system/src/font-weight/index.ts new file mode 100644 index 0000000000..2f03ffa83e --- /dev/null +++ b/packages/system/src/font-weight/index.ts @@ -0,0 +1,2 @@ +export * from './fontWeight'; +export type { FontWeights } from './types'; diff --git a/packages/system/src/font-weight/types.ts b/packages/system/src/font-weight/types.ts new file mode 100644 index 0000000000..a4c60f9dbc --- /dev/null +++ b/packages/system/src/font-weight/types.ts @@ -0,0 +1,8 @@ +import { fontWeights } from '@gympass/yoga-tokens'; + +type FontWeightsValues = typeof fontWeights | string | number; + +export type FontWeights = { + fontWeight?: FontWeightsValues; + fw?: FontWeightsValues; +};