Corrige click sur les carte sur chrome
parent
4091d16f09
commit
208f982691
|
@ -24,7 +24,10 @@ export default function Progress({
|
|||
value: progress,
|
||||
}
|
||||
|
||||
const a11yPrefixLabel = `Étape ${progress + step} sur ${String(maxValue)}`
|
||||
const a11yPrefixLabel = `Étape ${Math.min(
|
||||
progress + step,
|
||||
maxValue
|
||||
)} sur ${String(maxValue)}`
|
||||
|
||||
const { progressBarProps, labelProps } = useProgressBar(propsBar)
|
||||
|
||||
|
@ -36,7 +39,7 @@ export default function Progress({
|
|||
/>
|
||||
</ProgressContainer>
|
||||
<StyledBody {...labelProps} aria-hidden>
|
||||
{a11yPrefixLabel} <span className="sr-only">{propsBar.label}</span>
|
||||
{a11yPrefixLabel}
|
||||
</StyledBody>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -70,7 +70,6 @@ type StyledButtonProps = {
|
|||
|
||||
export const StyledButton = styled.button<StyledButtonProps>`
|
||||
width: fit-content;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
font-family: ${({ theme }) => theme.fonts.main};
|
||||
font-weight: 500;
|
||||
|
@ -106,14 +105,6 @@ export const StyledButton = styled.button<StyledButtonProps>`
|
|||
cursor: not-allowed;
|
||||
`}
|
||||
|
||||
&:active {
|
||||
${({ disabled }) =>
|
||||
!disabled &&
|
||||
css`
|
||||
transform: translateY(3px);
|
||||
`}
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
${({ disabled }) =>
|
||||
disabled
|
||||
|
@ -173,6 +164,9 @@ export const StyledButton = styled.button<StyledButtonProps>`
|
|||
color: ${theme.colors.extended.grey[100]};
|
||||
`}
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
|
||||
/* HOVER STYLE */
|
||||
:hover {
|
||||
${({ theme, $color, disabled, $light }) =>
|
||||
|
|
|
@ -133,11 +133,16 @@ const CardButton = styled(StyledButton)`
|
|||
|
||||
/* Hack to transmit state (hover, focused) to card */
|
||||
&::before {
|
||||
bottom: 0;
|
||||
content: '';
|
||||
inset: 0;
|
||||
box-sizing: inherit;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
`
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ const StyledBody = styled(Body)`
|
|||
`
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: fit-content;
|
||||
position: relative;
|
||||
`
|
||||
|
||||
|
@ -248,7 +249,7 @@ const StyledButton = styled(Button)`
|
|||
max-width: 55px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
margin: ${({ theme }) => theme.spacings.sm};
|
||||
margin: ${({ theme }) => theme.spacings.xs};
|
||||
position: absolute;
|
||||
`
|
||||
|
||||
|
|
Loading…
Reference in New Issue