diff --git a/src/core/styles/Forms.stories.tsx b/src/core/styles/Forms.stories.tsx index 990e38df..ee401164 100644 --- a/src/core/styles/Forms.stories.tsx +++ b/src/core/styles/Forms.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import Icon from "../Icon"; +import { Checkbox, RadioButton } from "./forms/story-components"; export default { title: "Styles/Forms", @@ -20,7 +20,7 @@ const exampleOptionFields = ( export const Inputs = { render: () => (
-
+

Default

-
-

Default (dark)

- -
-
+

Disabled

-
-

Disabled (dark)

- -

Invalid

Oof, what an input

-
-

Invalid (dark)

- -

Oof, what an input

-

With character insert

@@ -125,17 +95,6 @@ export const Dropdowns = { Select language
-
-

Dark mode

-
- -
-
), }; @@ -143,53 +102,41 @@ export const Dropdowns = { export const Checkboxes = { render: () => (
-
-

Default

-
- -
- -
- + {["Default", "Disabled"].map((label, groupIndex) => ( +
+

{label}

+ {Array(3) + .fill(0) + .map((_, i) => ( + + ))}
-
-
-

Disabled

-
- -
- -
- + ))} +
+ ), +}; + +export const RadioButtons = { + render: () => ( +
+ {["Default", "Disabled"].map((label, groupIndex) => ( +
+

{label}

+ {Array(3) + .fill(0) + .map((_, i) => ( + + ))}
-
+ ))}
), }; diff --git a/src/core/styles/__snapshots__/Forms.stories.tsx.snap b/src/core/styles/__snapshots__/Forms.stories.tsx.snap index 192031d3..5a4f7dfd 100644 --- a/src/core/styles/__snapshots__/Forms.stories.tsx.snap +++ b/src/core/styles/__snapshots__/Forms.stories.tsx.snap @@ -2,11 +2,11 @@ exports[`Styles/Forms Checkboxes smoke-test 1`] = `
-
+

Default

-
+
- Subscribe to the Ably newsletter + Option 1 + +
+
+ +
+ + + + +
+ +
+
+ +
+ + + + +
+
-
+

Disabled

-
+
- +
+
+ +
+ + + + +
+ +
+
+ +
+ + + + +
+
@@ -153,39 +251,12 @@ exports[`Styles/Forms Dropdowns smoke-test 1`] = ` Select language
-
-

- Dark mode -

-
- -
-
`; exports[`Styles/Forms Inputs smoke-test 1`] = `
-
+

Default

@@ -195,17 +266,7 @@ exports[`Styles/Forms Inputs smoke-test 1`] = ` autocomplete="off" >
-
-

- Default (dark) -

- -
-
+

Disabled

@@ -216,17 +277,6 @@ exports[`Styles/Forms Inputs smoke-test 1`] = ` disabled >
-
-

- Disabled (dark) -

- -

Invalid @@ -241,20 +291,6 @@ exports[`Styles/Forms Inputs smoke-test 1`] = ` Oof, what an input

-
-

- Invalid (dark) -

- -

- Oof, what an input -

-

With character insert @@ -273,6 +309,108 @@ exports[`Styles/Forms Inputs smoke-test 1`] = `

`; +exports[`Styles/Forms RadioButtons smoke-test 1`] = ` +
+
+

+ Default +

+
+ + +
+
+ + +
+
+ + +
+
+
+

+ Disabled +

+
+ + +
+
+ + +
+
+ + +
+
+
+`; + exports[`Styles/Forms Textareas smoke-test 1`] = `