-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(batch-selection): refactor stories to TS
- Loading branch information
Showing
3 changed files
with
102 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
src/components/batch-selection/batch-selection.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React from "react"; | ||
|
||
import BatchSelection from "."; | ||
import IconButton from "../icon-button"; | ||
import Icon from "../icon"; | ||
import Button from "../button"; | ||
|
||
export const Default = () => ( | ||
<BatchSelection selectedCount={0}> | ||
<Button size="small" mx={1} buttonType="secondary"> | ||
Select All 38 items | ||
</Button> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="csv" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="bin" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="pdf" /> | ||
</IconButton> | ||
</BatchSelection> | ||
); | ||
|
||
export const Dark = () => ( | ||
<BatchSelection selectedCount={1} colorTheme="dark"> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="csv" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="bin" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="pdf" /> | ||
</IconButton> | ||
</BatchSelection> | ||
); | ||
|
||
export const Light = () => ( | ||
<BatchSelection selectedCount={2} colorTheme="light"> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="csv" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="bin" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="pdf" /> | ||
</IconButton> | ||
</BatchSelection> | ||
); | ||
|
||
export const White = () => ( | ||
<BatchSelection selectedCount={3} colorTheme="white"> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="csv" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="bin" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="pdf" /> | ||
</IconButton> | ||
</BatchSelection> | ||
); | ||
|
||
export const Disabled = () => ( | ||
<BatchSelection selectedCount={4} disabled> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="csv" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="bin" /> | ||
</IconButton> | ||
<IconButton onAction={() => {}}> | ||
<Icon type="pdf" /> | ||
</IconButton> | ||
</BatchSelection> | ||
); |