From 7c1987b82bb48a88dfae56f90c576d3a56ca6bfd Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Mon, 5 Aug 2024 08:40:53 +0200 Subject: [PATCH] docs: fix `getApperance` helper (#4076) Co-authored-by: sarahgm <38324334+sarahgm@users.noreply.github.com> --- docs/lib/utils.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/lib/utils.tsx b/docs/lib/utils.tsx index 55de9264c0..5851d4222f 100644 --- a/docs/lib/utils.tsx +++ b/docs/lib/utils.tsx @@ -21,8 +21,8 @@ export const iterateTokens = (colors: NestedStringObject, prefix = '') => { const getKeys = (schema: ConfigSchema) => { return { - variant: schema?.variant && Object.keys(schema?.variant), - size: schema?.size && Object.keys(schema?.size), + variant: schema?.variant ? Object.keys(schema?.variant) : [], + size: schema?.size ? Object.keys(schema?.size) : [], }; }; @@ -52,6 +52,6 @@ export const getAppearance = ( 'variants' in styles ? getKeys(styles.variants as ConfigSchema) : getKeysFromSlots(styles); - + console.log(appearances); return appearances; };