Corrige le comportement des cartes inertes

pull/2527/head
Johan Girod 2023-02-28 16:44:01 +01:00
parent e53c6d86b2
commit b48d7aa4f2
2 changed files with 4 additions and 8 deletions

View File

@ -136,10 +136,10 @@ export const CardContainer = styled.div<{
cursor: ${({ $inert }) => ($inert ? 'auto' : 'pointer')};
flex-direction: column;
align-items: center;
background-color: ${({ theme }) =>
background-color: ${({ theme, $inert }) =>
theme.darkMode
? theme.colors.extended.dark[600]
: theme.colors.extended.grey[100]};
: theme.colors.extended.grey[$inert ? 200 : 100]};
border-radius: ${({ theme }) => theme.box.borderRadius};
box-shadow: ${({ theme }) =>
theme.darkMode ? theme.elevationsDarkMode[2] : theme.elevations[2]};

View File

@ -1,6 +1,6 @@
import { AriaRadioProps } from '@react-types/radio'
import { ComponentProps } from 'react'
import styled, { css } from 'styled-components'
import styled from 'styled-components'
import { Markdown } from '@/components/utils/markdown'
import { CardContainer } from '@/design-system/card/Card'
@ -36,11 +36,7 @@ const StyledCardContainer = styled(CardContainer)`
background: transparent;
border: none;
}
${({ theme, $inert }) =>
$inert &&
css`
background-color: ${theme.colors.extended.grey[200]};
`}
margin: 0.5rem 0;
`