Skip to content

Commit 27f6687

Browse files
committed
Add an introduction page to the storybook website
1 parent 6db419d commit 27f6687

File tree

7 files changed

+494
-36
lines changed

7 files changed

+494
-36
lines changed

.storybook/DocsContainer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const DocsContainer = ({ children, context }) => {
4343
.docblock-argstable-head th:nth-child(3), .docblock-argstable-body tr > td:nth-child(3) {
4444
visibility: collapse;
4545
}
46-
4746
`}</style>
4847
<BaseContainer
4948
context={{

.storybook/manager-head.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<link rel="manifest" href="favicon/manifest.webmanifest" crossorigin="use-credentials" />
55

66
<style>
7+
8+
.sidebar-item[data-nodetype="document"] svg {
9+
display: none;
10+
}
11+
712
@font-face {
813
font-family: Marianne;
914
src: url("fonts/Marianne-Light.woff2") format("woff2"), url("fonts/Marianne-Light.woff") format("woff");

.storybook/static/repo-card.png

160 KB
Loading

docs/intro.stories.mdx

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
11
import { Meta } from "@storybook/addon-docs";
22
import { useDarkMode } from "storybook-dark-mode";
33

4-
<Meta title="Documentation/Introduction" />
4+
<Meta title="Guides/🇫🇷 Introduction" />
55

6-
<div style={{ margin: '0 auto', maxWidth: '600px', color: 'white', textAlign: 'center' }}>
7-
<p align="center">
8-
<img src={useDarkMode() ? "https://user-images.githubusercontent.com/81740200/182106566-100cfb98-814a-4c13-bddd-27a6e16dbf99.png" : "https://user-images.githubusercontent.com/81740200/182105896-2c1b04ce-a02f-4bbe-a3e5-ec1c16e0bf15.png"} />
9-
</p>
10-
<p align="center">
11-
<i>A disruptive UI toolkit</i><br/>
12-
<i>Optimized for TypeScript</i><br/>
13-
<i>Highly customizable but looks great out of the box.</i><br/>
14-
<i>Compatible with mui large library of components</i>
15-
<br/>
16-
<br/>
17-
<img src="https://github.com/InseeFrLab/disiz/workflows/ci/badge.svg?branch=main"/>
18-
<img src="https://img.shields.io/npm/dw/disiz"/>
19-
<img src="https://img.shields.io/npm/l/disiz"/>
20-
</p>
21-
22-
Default design system carefully crafted by [Marc Hufschmitt](http://marchufschmitt.fr/)
23-
24-
This project is under active development. It's APIs are susceptible to change until v1.
25-
26-
`disiz` is largely inspired by [`onyxia-ui`](https://github.com/InseeFrlab/onyxia-ui)
27-
28-
WARNING: `disiz` isn't currently working with SSR. (You can't use it with Next.js)
6+
<div style={{ "margin": "0 auto", "maxWidth": "600px", "textAlign": "center" }}>
7+
<img src="repo-card.png" />
8+
🇫🇷 <i><a href="https://www.systeme-de-design.gouv.fr/">French State Design System</a> React integration</i> 🇫🇷
299

10+
This module is a React integration layer for [@gouvfr/dsfr](https://github.com/GouvernementFR/dsfr), the vanilla JS/CSS implementation of the DSFR.
11+
Comes with very precise type definitions. (But works fine in vanilla JavaScript projects.)
3012
</div>

docs/quick-start.stories.mdx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
import { Meta } from "@storybook/addon-docs";
22
import { Alert } from "../dist/Alert";
3+
import ReactMarkdown from "react-markdown";
34

4-
<Meta title="Documentation/🔧 Initial setup" />
55

6-
{% hint style="warning" %}
7-
If you already had the DSFR installed in your project, let's start from scratch: &#x20;
6+
<Meta title="Guides/🔧 Initial setup" />
87

9-
* Remove [`@gouvfr/dsfr`](https://www.npmjs.com/package/@gouvfr/dsfr) from your dependencies.
10-
* Remove all imports:`dsfr.css`, `dsfr.module.js` the favicon and the fonts.
11-
* Remove `thedata-fr-scheme` (and `data-fr-theme` ) attribude from your `<html/>` tag.
12-
{% endhint %}
8+
9+
# 🔧 Initial setup
10+
11+
_Setup `@codegouvfr/react-dsfr` in your project_
12+
13+
<Alert
14+
severity="warning"
15+
title="Warning: If you already had the DSFR installed in your project"
16+
isClosable
17+
description={<ReactMarkdown>{
18+
`* Remove [\`@gouvfr/dsfr\`](https://www.npmjs.com/package/@gouvfr/dsfr) from your dependencies.
19+
* Remove all imports: \`dsfr.css\`, \`dsfr.module.js\` the favicon and the fonts.
20+
* Remove the \`data-fr-scheme\` (and \`data-fr-theme\` ) attribude from your \`<html/>\` tag.`
21+
}</ReactMarkdown>}
22+
/>
1323

1424
```bash
1525
yarn add @codegouvfr/react-dsfr # Or: 'npm install --save @codegouvfr/react-dsfr'
1626
```
1727

18-
<Alert severity="success" title="ok" description="description" />

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"prettier": "^2.3.0",
106106
"react": "18.2.0",
107107
"react-dom": "18.2.0",
108+
"react-markdown": "^8.0.3",
108109
"remixicon": "^2.5.0",
109110
"storybook-dark-mode": "^1.1.2",
110111
"ts-node": "^10.9.1",

0 commit comments

Comments
 (0)