Skip to content

Commit

Permalink
fix: scales map
Browse files Browse the repository at this point in the history
  • Loading branch information
LexSwed committed Sep 29, 2020
1 parent 4e1475a commit 1975991
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/lib/theme/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ const createScalesVariant = (property: string, customScales: ScalesMap) =>
Object.fromEntries(
Object.keys(scales)
.map((scale) => [scale, { [property]: scale }])
.concat(Object.keys(customScales).map((scale) => [scale, { [property]: scale }]))
.concat(
Object.keys(customScales).map((scale) => [
scale,
{ [property]: customScales[scale as keyof typeof customScales] },
])
)
);

export const gaps = createScalesVariant('gap', gapScale);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/Stack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Stack, Text, styled } from '@fxtrot/ui';

import { ExampleBox } from '../../pages-helpers';

# Button
# Stack

## Space

Expand Down

0 comments on commit 1975991

Please sign in to comment.