From 0153b5043bb205fa328af15d79a52e4d16acfa16 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Thu, 25 May 2023 15:43:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D(react)=20add=20forms=20examples=20?= =?UTF-8?q?to=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We think doing this really illustrates what the design system looks in real life, all components living together next to each other. --- .changeset/perfect-countries-clean.md | 5 + .../Forms/Examples/index.stories.tsx | 147 +++++++++++++++++- packages/react/src/cunningham-tokens.js | 2 +- packages/react/src/cunningham-tokens.ts | 2 +- yarn.lock | 2 +- 5 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 .changeset/perfect-countries-clean.md diff --git a/.changeset/perfect-countries-clean.md b/.changeset/perfect-countries-clean.md new file mode 100644 index 0000000..7f6f07e --- /dev/null +++ b/.changeset/perfect-countries-clean.md @@ -0,0 +1,5 @@ +--- +"@openfun/cunningham-react": minor +--- + +add forms examples to documentation diff --git a/packages/react/src/components/Forms/Examples/index.stories.tsx b/packages/react/src/components/Forms/Examples/index.stories.tsx index a12d806..3fe5dbb 100644 --- a/packages/react/src/components/Forms/Examples/index.stories.tsx +++ b/packages/react/src/components/Forms/Examples/index.stories.tsx @@ -1,9 +1,154 @@ import { Meta } from "@storybook/react"; +import React from "react"; +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 { Switch } from ":/components/Forms/Switch"; +import { Radio } from ":/components/Forms/Radio"; export default { title: "Components/Forms/Examples", } as Meta; export const Login = () => { - return
DOUDOU
; + return ( +
+

+ Please log-in! +

+ + +
+ +
+ +
+ ); +}; + +export const Application = () => { + return ( + +
+

+ Application +

+ + + + + + +
+ + +
+ + + + +
+ ); +}; + +export const Sports = () => { + return ( + +
+

+ Register +

+
+ + +
+ +
+ + + +
+