diff --git a/scm-ui/ui-components/src/CardColumn.stories.tsx b/scm-ui/ui-components/src/CardColumn.stories.tsx index d2a59e0d4b..a8193a193b 100644 --- a/scm-ui/ui-components/src/CardColumn.stories.tsx +++ b/scm-ui/ui-components/src/CardColumn.stories.tsx @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { FC } from "react"; +import React from "react"; import { MemoryRouter } from "react-router-dom"; import { storiesOf } from "@storybook/react"; import CardColumn from "./CardColumn"; @@ -35,8 +35,6 @@ const Wrapper = styled.div` max-width: 400px; `; -const Container: FC = ({ children }) => {children}; - const link = "/foo/bar"; const avatar = ; const title = title; @@ -46,8 +44,8 @@ const baseDate = "2020-03-26T12:13:42+02:00"; storiesOf("CardColumn", module) .addDecorator(story => {story()}) - .addDecorator(storyFn => {storyFn()}) - .add("default", () => ( + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( )) - .add("minimal", () => ( + .add("Minimal", () => ) + .add("With hoverable date", () => ( + + + } /> - )) - .add("with hoverable date", () => ( - - - } /> - )); + )); diff --git a/scm-ui/ui-components/src/CardColumnSmall.stories.tsx b/scm-ui/ui-components/src/CardColumnSmall.stories.tsx index 029e5b1548..eab79635cc 100644 --- a/scm-ui/ui-components/src/CardColumnSmall.stories.tsx +++ b/scm-ui/ui-components/src/CardColumnSmall.stories.tsx @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { FC } from "react"; +import React from "react"; import { MemoryRouter } from "react-router-dom"; import { storiesOf } from "@storybook/react"; import CardColumnSmall from "./CardColumnSmall"; @@ -33,8 +33,6 @@ const Wrapper = styled.div` max-width: 400px; `; -const Container: FC = ({ children }) => {children}; - const link = "/foo/bar"; const icon = ; const contentLeft = main content; @@ -42,10 +40,8 @@ const contentRight = more text; storiesOf("CardColumnSmall", module) .addDecorator(story => {story()}) - .addDecorator(storyFn => {storyFn()}) - .add("default", () => ( + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( )) - .add("minimal", () => ( - - )); + .add("Minimal", () => ); diff --git a/scm-ui/ui-components/src/Icon.stories.tsx b/scm-ui/ui-components/src/Icon.stories.tsx index 8d4e2c2cd2..f51b615120 100644 --- a/scm-ui/ui-components/src/Icon.stories.tsx +++ b/scm-ui/ui-components/src/Icon.stories.tsx @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { FC } from "react"; +import React from "react"; import { storiesOf } from "@storybook/react"; import styled from "styled-components"; import Icon from "./Icon"; @@ -32,31 +32,56 @@ const Wrapper = styled.div` } `; -const Container: FC = ({ children }) => {children}; - const helloWorld = () => { alert("Hello world!"); }; +const colors = ["primary", "link", "info", "success", "warning", "danger", "white", "light", "dark", "black", "text"]; +const sizing = ["xs", "sm", "lg", "2x", "3x", "5x", "7x", "10x"]; + storiesOf("Icon", module) - .addDecorator(storyFn => {storyFn()}) - .add("default", () => ( + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( <> + + + )) + .add("Colors", () => ( + <> + + {colors.map(color => ( + + ))} + + )) + .add("Sizing", () => ( + <> + + {sizing.map(size => ( + + ))} + + )) + .add("Icon styles", () => ( + <> + + + + + )) + .add("More options", () => ( + <> + + + helloWorld()} /> - )) - .add("minimal", () => ( - <> - - - - )); diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 05312337e3..47cf3c699b 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -445,7 +445,7 @@ exports[`Storyshots Buttons|SubmitButton Default 1`] = ` `; -exports[`Storyshots CardColumn default 1`] = ` +exports[`Storyshots CardColumn Default 1`] = `
@@ -510,7 +510,7 @@ exports[`Storyshots CardColumn default 1`] = `
`; -exports[`Storyshots CardColumn minimal 1`] = ` +exports[`Storyshots CardColumn Minimal 1`] = `
@@ -558,7 +558,7 @@ exports[`Storyshots CardColumn minimal 1`] = `
`; -exports[`Storyshots CardColumn with hoverable date 1`] = ` +exports[`Storyshots CardColumn With hoverable date 1`] = `
@@ -613,7 +613,7 @@ exports[`Storyshots CardColumn with hoverable date 1`] = `
`; -exports[`Storyshots CardColumnSmall default 1`] = ` +exports[`Storyshots CardColumnSmall Default 1`] = `
@@ -661,7 +661,7 @@ exports[`Storyshots CardColumnSmall default 1`] = `
`; -exports[`Storyshots CardColumnSmall minimal 1`] = ` +exports[`Storyshots CardColumnSmall Minimal 1`] = `
@@ -32706,10 +32706,68 @@ exports[`Storyshots Forms|Textarea OnSubmit 1`] = `
`; -exports[`Storyshots Icon default 1`] = ` +exports[`Storyshots Icon Colors 1`] = `
+ + + + + + + + + + + + +
+`; + +exports[`Storyshots Icon Default 1`] = ` +
+ -
`; -exports[`Storyshots Icon minimal 1`] = ` +exports[`Storyshots Icon Icon styles 1`] = `
+
+`; + +exports[`Storyshots Icon More options 1`] = ` +
+ + + + +
+`; + +exports[`Storyshots Icon Sizing 1`] = ` +
+ + + + + + + + +
`;