diff --git a/stories/FormCheckbox/Styled.stories.mdx b/stories/FormCheckbox/Styled.stories.mdx index 760615ee..d106f929 100644 --- a/stories/FormCheckbox/Styled.stories.mdx +++ b/stories/FormCheckbox/Styled.stories.mdx @@ -22,13 +22,16 @@ In this section we're using the formCheckbox component providing the GovUk style return (
-
+
+### GDS styled checkbox preselected + + + + {() => { + const [value, setValue] = React.useState(''); + const [checked, setChecked] = React.useState(false); + const handleChange = (event) => { + setValue(event.currentTarget.value); + setChecked(!checked); + }; + return ( +
+
+
+ +
+
+
+ ); + }} +
+
+ + +### GDS styled checkbox disabled + + + + {() => { + const [value, setValue] = React.useState(''); + const [checked, setChecked] = React.useState(false); + const handleChange = (event) => { + setValue(event.currentTarget.value); + setChecked(!checked); + }; + return ( +
+
+
+ +
+
+
+ ); + }} +
+
+ ### GDS styled checkbox with hint @@ -60,28 +150,86 @@ In this section we're using the formCheckbox component providing the GovUk style setChecked(!checked); }; return ( - +
+
+
+ +
+
+
+ ); + }} + +
+ +### GDS styled checkbox with hint above + + + + {() => { + const [value, setValue] = React.useState(''); + const [checked, setChecked] = React.useState(false); + const handleChange = (event) => { + setValue(event.currentTarget.value); + setChecked(!checked); + }; + return ( +
+
+
+ +
+
+
); }}
@@ -103,37 +251,46 @@ In this section we're using the formCheckbox component providing the GovUk style console.log(conditional); }; return ( - +
+
+
+ +
+
+
); }} @@ -155,38 +312,47 @@ In this section we're using the formCheckbox component providing the GovUk style console.log(conditional); }; return ( - +
+
+
+ +
+
+
); }} @@ -204,23 +370,32 @@ In this section we're using the formCheckbox component providing the GovUk style setChecked(!checked); }; return ( - +
+
+
+ +
+
+
); }}