From 0ce6677903c04fe7f3773941ea1e329ddbbc289d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 5 Sep 2022 19:20:00 +0200 Subject: [PATCH] Refacto developer documentation --- .../ChiffreAffairesActivitéMixte.tsx | 2 +- .../design-system/accordion/index.stories.tsx | 2 +- site/source/design-system/accordion/index.tsx | 22 +++++++---- site/source/design-system/index.ts | 2 +- site/source/design-system/switch/Switch.tsx | 2 +- site/source/pages/Documentation.tsx | 38 +++++++++++++++++++ .../declaration.tsx | 3 +- .../imposition.tsx | 3 +- 8 files changed, 59 insertions(+), 15 deletions(-) diff --git a/site/source/components/ChiffreAffairesActivitéMixte.tsx b/site/source/components/ChiffreAffairesActivitéMixte.tsx index 6c529ef36..c63547881 100644 --- a/site/source/components/ChiffreAffairesActivitéMixte.tsx +++ b/site/source/components/ChiffreAffairesActivitéMixte.tsx @@ -143,6 +143,7 @@ function ActivitéMixte() { const StyledActivitéMixteContainer = styled.div` display: flex; align-items: center; + justify-content: flex-end; @media (min-width: ${({ theme }) => theme.breakpointsWidth.sm}) { text-align: right; @@ -150,7 +151,6 @@ const StyledActivitéMixteContainer = styled.div` position: relative; z-index: 2; display: flex; - justify-content: flex-end; align-items: center; } ` diff --git a/site/source/design-system/accordion/index.stories.tsx b/site/source/design-system/accordion/index.stories.tsx index ada9ade99..e6f191689 100644 --- a/site/source/design-system/accordion/index.stories.tsx +++ b/site/source/design-system/accordion/index.stories.tsx @@ -1,7 +1,7 @@ -import { ComponentStory, ComponentMeta } from '@storybook/react' import { Accordion } from '@/design-system' import { Body } from '@/design-system/typography/paragraphs' import { Item } from '@react-stately/collections' +import { ComponentMeta, ComponentStory } from '@storybook/react' // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { diff --git a/site/source/design-system/accordion/index.tsx b/site/source/design-system/accordion/index.tsx index ad59c00a5..627b9fbf5 100644 --- a/site/source/design-system/accordion/index.tsx +++ b/site/source/design-system/accordion/index.tsx @@ -9,9 +9,7 @@ import useMeasure from 'react-use-measure' import styled, { css } from 'styled-components' import chevronImg from './chevron.svg' -export default function Accordion( - props: AriaAccordionProps -) { +export const Accordion = (props: AriaAccordionProps) => { const state = useTreeState(props) const ref = useRef(null) const { accordionProps } = useAccordion(props, state, ref) @@ -64,7 +62,10 @@ function AccordionItem(props: AccordionItemProps) {