Skip to content

Commit

Permalink
refactor(theme/Table): use minimal styling as the default.
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerAPfledderer committed Jun 15, 2023
1 parent c1c36a2 commit c62911c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/@chakra-ui/gatsby-plugin/components/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const numericStyles = defineStyle({
const baseStyle = defineMergeStyles(tableDefaultTheme.baseStyle, {
table: {
minW: "556px",
thead: {
bg: "backgroundHighlight",
},
th: {
borderBottom: "1px",
borderColor: "primaryVisited",
Expand Down Expand Up @@ -68,18 +65,19 @@ const variantStriped = definePartsStyle({
},
})

const variantMinimal = definePartsStyle({
const variantSimple = definePartsStyle({
table: {
thead: {
bg: "transparent",
bg: "backgroundHighlight",
},
},
})

export const Table = defineMultiStyleConfig({
baseStyle,
variants: {
minimal: {},
striped: variantStriped,
minimal: variantMinimal,
simple: variantSimple,
},
})
4 changes: 2 additions & 2 deletions src/components/Table/stories/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Tables: Story = {
render: (args) => (
<>
<TableComponent {...args} />
<TableComponent {...args} variant="minimal" />
<TableComponent {...args} variant="simple" />
<TableComponent {...args} variant="striped" />
</>
),
Expand All @@ -42,7 +42,7 @@ export const Tables: Story = {
export const MockDocContent: Story = {
render: () => (
<>
<TableComponent children={<MdxEnergyConsumpData />} />
<TableComponent children={<MdxEnergyConsumpData />} variant="simple" />
<TableComponent children={<MdxTypesOfBridgesData />} />
</>
),
Expand Down

0 comments on commit c62911c

Please sign in to comment.