Skip to content

Commit 285ffd3

Browse files
committed
docs(Compact): custom theme should use baseline theme
1 parent 8ad9c9d commit 285ffd3

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.storybook/stories/Compact/theme.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as React from 'react';
22

33
import { CompactTable } from '@table-library/react-table-library/compact';
44
import { useTheme } from '@table-library/react-table-library/theme';
5+
import { getTheme } from '@table-library/react-table-library/baseline';
56

67
import { DocumentationSee } from '../documentation';
78
import { nodes } from '../data';
@@ -11,20 +12,23 @@ const key = 'Theme';
1112
const Component = () => {
1213
const data = { nodes };
1314

14-
const theme = useTheme({
15-
HeaderRow: `
16-
background-color: #eaf5fd;
17-
`,
18-
Row: `
19-
&:nth-of-type(odd) {
20-
background-color: #d2e9fb;
21-
}
22-
23-
&:nth-of-type(even) {
15+
const theme = useTheme([
16+
getTheme(),
17+
{
18+
HeaderRow: `
2419
background-color: #eaf5fd;
25-
}
26-
`,
27-
});
20+
`,
21+
Row: `
22+
&:nth-of-type(odd) {
23+
background-color: #d2e9fb;
24+
}
25+
26+
&:nth-of-type(even) {
27+
background-color: #eaf5fd;
28+
}
29+
`,
30+
},
31+
]);
2832

2933
const COLUMNS = [
3034
{ label: 'Task', renderCell: (item) => item.name },

0 commit comments

Comments
 (0)