🐛 Fix la selection de texte dans les Accordion

pull/2092/head
Jérémy Rialland 2022-04-04 19:17:08 +02:00 committed by Johan Girod
parent 9f1f7be52e
commit 7baceafb22
3 changed files with 5 additions and 10 deletions

View File

@ -1,10 +1,9 @@
import { FocusStyle } from '@/design-system/global-style'
import { useAccordion, useAccordionItem } from '@react-aria/accordion'
import { filterDOMProps } from '@react-aria/utils'
import { TreeState, useTreeState } from '@react-stately/tree'
import { AriaAccordionProps } from '@react-types/accordion'
import { Node } from '@react-types/shared'
import React, { useRef } from 'react'
import { useRef } from 'react'
import { animated, useSpring } from 'react-spring'
import useMeasure from 'react-use-measure'
import styled, { css } from 'styled-components'
@ -18,11 +17,7 @@ export default function Accordion<T extends object>(
const { accordionProps } = useAccordion(props, state, ref)
return (
<StyledAccordionGroup
{...filterDOMProps(props)}
{...accordionProps}
ref={ref}
>
<StyledAccordionGroup {...props} {...accordionProps} ref={ref}>
{[...state.collection].map((item) => (
<AccordionItem<T> key={item.key} item={item} state={state} />
))}
@ -62,7 +57,7 @@ function AccordionItem<T>(props: AccordionItemProps<T>) {
})
return (
<StyledAccordionItem>
<StyledAccordionItem onMouseDown={(x) => x.stopPropagation()}>
<StyledTitle>
<StyledButton {...buttonProps} ref={ref}>
<span>{item.props.title}</span>

View File

@ -152,7 +152,6 @@ export default function Imposition() {
</Intro>
<Message type="info" icon>
<Body>
<Body></Body>
Si vous ne retrouvez pas ce document, ou si il n'est plus à
jour, vous pouvez{' '}
<Strong>contacter le service des impôt</Strong> pour qu'il

View File

@ -10,6 +10,7 @@ import { Strong } from '@/design-system/typography'
import { Link } from '@/design-system/typography/link'
import { Li, Ul } from '@/design-system/typography/list'
import { Body, Intro } from '@/design-system/typography/paragraphs'
import { omit } from '@/utils'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { Redirect, Route, Switch } from 'react-router'
@ -55,7 +56,7 @@ export default function AideDéclarationIndépendant() {
<Spacing lg />
<Stepper aria-label="Étapes de l'assistant">
{steps.map((step) => (
<Step key={step.to} {...step} />
<Step key={step.to} {...omit(step, 'page')} />
))}
</Stepper>
<Switch>