diff --git a/packages/react/src/components/DataGrid/index.stories.tsx b/packages/react/src/components/DataGrid/index.stories.tsx index c51f86e..0c16d92 100644 --- a/packages/react/src/components/DataGrid/index.stories.tsx +++ b/packages/react/src/components/DataGrid/index.stories.tsx @@ -3,7 +3,6 @@ import React, { useEffect, useMemo, useState } from "react"; import { faker } from "@faker-js/faker"; import { DataGrid, SortModel } from ":/components/DataGrid/index"; import { usePagination } from ":/components/Pagination"; -import { CunninghamProvider } from ":/components/Provider"; import { Button } from ":/components/Button"; import { SimpleDataGrid } from ":/components/DataGrid/SimpleDataGrid"; import { DataList } from ":/components/DataGrid/DataList"; @@ -15,36 +14,32 @@ export default { export const Empty = () => { return ( - - - + ); }; export const Loading = () => { return ( - - - + ); }; @@ -61,43 +56,41 @@ export const ClientSideWithoutPagination = () => { [], ); return ( - - ( - - ); - }, + { + return ( + + ); }, - ]} - /> - + }, + ]} + /> ); }; diff --git a/packages/react/src/components/Forms/Checkbox/index.stories.tsx b/packages/react/src/components/Forms/Checkbox/index.stories.tsx index ff8a2f2..d5002b1 100644 --- a/packages/react/src/components/Forms/Checkbox/index.stories.tsx +++ b/packages/react/src/components/Forms/Checkbox/index.stories.tsx @@ -122,7 +122,7 @@ export const Success = { export const Group = () => (
-
Your offices
+
Your offices
@@ -135,7 +135,7 @@ export const Group = () => ( export const GroupError = () => (
-
Your offices
+
Your offices
@@ -148,7 +148,7 @@ export const GroupError = () => ( export const GroupSuccess = () => (
-
Your offices
+
Your offices
diff --git a/packages/react/src/components/Forms/DatePicker/index.stories.tsx b/packages/react/src/components/Forms/DatePicker/index.stories.tsx index 5520852..10fd693 100644 --- a/packages/react/src/components/Forms/DatePicker/index.stories.tsx +++ b/packages/react/src/components/Forms/DatePicker/index.stories.tsx @@ -16,16 +16,12 @@ export default { } as Meta; const Template: StoryFn = (args) => ( - - - + ); export const Default = () => (
- - - +
); @@ -98,13 +94,11 @@ export const Fullwidth = { export const CustomLocale = () => (
- - - +
); @@ -122,21 +116,19 @@ export const CunninghamLocale = () => ( export const Controlled = () => { const [value, setValue] = useState("2023-04-25T12:00:00.000Z"); return ( - -
-
- Value: {value?.toString()} -
- { - setValue(e); - }} - /> - +
+
+ Value: {value?.toString()}
- + { + setValue(e); + }} + /> + +
); }; @@ -153,47 +145,41 @@ export const ReactHookForm = () => { }); return ( - - -
- - - -
-
+ +
+ + + +
); }; export const RangeDefault = () => { return (
- - - +
); }; export const RangeDefaultValue = () => { return ( - - - + ); }; @@ -204,18 +190,16 @@ export const RangeControlled = () => { ]); return (
- -
Value: {value?.join(" ")}
- setValue(e)} - /> - -
+
Value: {value?.join(" ")}
+ setValue(e)} + /> +
); }; diff --git a/packages/react/src/components/Forms/Examples/ReactHookForm/Sports.stories.tsx b/packages/react/src/components/Forms/Examples/ReactHookForm/Sports.stories.tsx index 7b1b4a7..9208e7b 100644 --- a/packages/react/src/components/Forms/Examples/ReactHookForm/Sports.stories.tsx +++ b/packages/react/src/components/Forms/Examples/ReactHookForm/Sports.stories.tsx @@ -5,7 +5,6 @@ import { useForm, FormProvider } from "react-hook-form"; import * as Yup from "yup"; import { RhfInput } from ":/components/Forms/Input/stories-utils"; import { Button } from ":/components/Button"; -import { CunninghamProvider } from ":/components/Provider"; import { Radio, RadioGroup } from ":/components/Forms/Radio"; import { RhfSelect } from ":/components/Forms/Select/stories-utils"; import { @@ -55,119 +54,117 @@ const SportsBase = ({ values }: SportProps) => { }, [values]); return ( - - -
+ +

-

- Register -

+ Register + -
-
Gender
- +
Gender
+ + - - - - -
-
- - -
+ + +
+
+ + +
- - - - - Need help ? - - - -
+ + + + + Need help ? + + + ); }; diff --git a/packages/react/src/components/Forms/Examples/index.stories.tsx b/packages/react/src/components/Forms/Examples/index.stories.tsx index 3d85297..c739b3b 100644 --- a/packages/react/src/components/Forms/Examples/index.stories.tsx +++ b/packages/react/src/components/Forms/Examples/index.stories.tsx @@ -5,7 +5,6 @@ import { Input } from ":/components/Forms/Input"; import { Checkbox } from ":/components/Forms/Checkbox"; import { Button } from ":/components/Button"; import { Select } from ":/components/Forms/Select"; -import { CunninghamProvider } from ":/components/Provider"; import { FileUploader } from ":/components/Forms/FileUploader"; import { Switch } from ":/components/Forms/Switch"; import { Radio } from ":/components/Forms/Radio"; @@ -55,291 +54,276 @@ export const Login = () => { export const Application = () => { return ( - -
+

-

- Application -

- +
+ + +
+ +
+
+ +
+ +
+
+
Your curriculum vitae
+ -
- - -
- -
-
- -
- -
-
-
- Your curriculum vitae -
- -
-
- - -
- - - - Need help ? - - - +
+
+ + +
+ + + + Need help ? + + ); }; export const Sports = () => { return ( - -
e.preventDefault()} + > +

-

- Register -

-
-
Gender
-
- - - -
-
-
- - + Register + +
+
Gender
+
+ + +
+
+
+ + +
- - - - - - Need help ? - - - + + + + + + Need help ? + + ); }; export const SportsDisabled = () => { const [withValues, setWithValues] = useState(false); return ( - -
+

-

- Register -

-
-
Gender
-
- - - -
-
-
- - + Register + +
+
Gender
+
+ + +
+
+
+ + +
- - - - setWithValues(e.target.checked)} - /> - - - Need help ? - - - + + + + setWithValues(e.target.checked)} + /> + + + Need help ? + + ); }; diff --git a/packages/react/src/components/Forms/FileUploader/index.stories.tsx b/packages/react/src/components/Forms/FileUploader/index.stories.tsx index 24b72c7..5f4ba63 100644 --- a/packages/react/src/components/Forms/FileUploader/index.stories.tsx +++ b/packages/react/src/components/Forms/FileUploader/index.stories.tsx @@ -1,19 +1,12 @@ -import { Meta, StoryFn } from "@storybook/react"; +import { Meta } from "@storybook/react"; import React, { useEffect, useRef, useState } from "react"; import { faker } from "@faker-js/faker"; import { FileUploader, FileUploaderRefType, } from ":/components/Forms/FileUploader/index"; -import { CunninghamProvider } from ":/components/Provider"; import { Button } from ":/components/Button"; -const Template: StoryFn = (args) => ( - - - -); - const FAKE_FILES = [ new File(["42"], faker.lorem.sentence(5) + "pdf"), new File(["42"], faker.lorem.sentence(1) + "pdf"), @@ -24,7 +17,6 @@ const FAKE_FILES = [ const meta: Meta = { title: "Components/Forms/FileUploader", component: FileUploader, - render: Template, }; export default meta; @@ -146,7 +138,7 @@ export const MonoStatesShowcase = { // the fake default files. In all other step we want it to be persistant in order to see transitions ( like the // border color ). return ( -