Skip to content

Commit 42f5392

Browse files
committed
chore: add a story for a row with border
1 parent 2f571cb commit 42f5392

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/Table/BaseTable.story.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable react/prop-types */
22
import React from "react";
3+
import styled from "styled-components";
34
import { boolean, text } from "@storybook/addon-knobs";
45
import { action } from "@storybook/addon-actions";
56
import { Box, DropdownButton, DropdownMenu, Button, Text } from "..";
@@ -280,7 +281,7 @@ export const WithData = () => (
280281
);
281282

282283
WithData.story = {
283-
name: " with data",
284+
name: "with data",
284285
};
285286

286287
export const WithNoData = () => (
@@ -392,3 +393,24 @@ WithAFooter.story = {
392393
name: "with a footer",
393394
};
394395
/* eslint-enable react/prop-types */
396+
397+
const TableWithBorderedRows = styled(Table)`
398+
border-collapse: collapse;
399+
400+
> tbody > tr {
401+
border-bottom: 1px solid;
402+
border-color: ${({ theme }) => theme.colors.lightGrey};
403+
border-collapse: collapse;
404+
}
405+
`;
406+
407+
export const WithRowBorder = () => (
408+
<TableWithBorderedRows
409+
columns={columns}
410+
rows={rowData}
411+
rowHovers={boolean("Show row hovers", true)}
412+
compact={boolean("Show with compact styling", false)}
413+
loading={boolean("Show loading state", false)}
414+
className="Table"
415+
/>
416+
);

0 commit comments

Comments
 (0)