mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
fix: Apply disabled style to card content instead of wrapper
This commit is contained in:
parent
4049b4c396
commit
71e2c5d8df
2 changed files with 19 additions and 13 deletions
|
@ -101,18 +101,19 @@ const Card = React.memo(({ id, isInline }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(styles.wrapper, isHighlightedAsRecent && styles.wrapperRecent, 'card')}
|
||||||
styles.wrapper,
|
|
||||||
list.type === ListTypes.CLOSED && styles.wrapperDisabled,
|
|
||||||
isHighlightedAsRecent && styles.wrapperRecent,
|
|
||||||
'card',
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{card.isPersisted ? (
|
{card.isPersisted ? (
|
||||||
<>
|
<>
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,
|
||||||
jsx-a11y/no-static-element-interactions */}
|
jsx-a11y/no-static-element-interactions */}
|
||||||
<div className={styles.content} onClick={handleClick}>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
styles.content,
|
||||||
|
list.type === ListTypes.CLOSED && styles.contentDisabled,
|
||||||
|
)}
|
||||||
|
onClick={handleClick}
|
||||||
|
>
|
||||||
<Content cardId={id} />
|
<Content cardId={id} />
|
||||||
{colorLineNode}
|
{colorLineNode}
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +126,12 @@ const Card = React.memo(({ id, isInline }) => {
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<span className={styles.content}>
|
<span
|
||||||
|
className={classNames(
|
||||||
|
styles.content,
|
||||||
|
list.type === ListTypes.CLOSED && styles.contentDisabled,
|
||||||
|
)}
|
||||||
|
>
|
||||||
<Content cardId={id} />
|
<Content cardId={id} />
|
||||||
{colorLineNode}
|
{colorLineNode}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -43,6 +43,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contentDisabled {
|
||||||
|
filter: saturate(0.5);
|
||||||
|
opacity: 0.64;
|
||||||
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -59,11 +64,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapperDisabled {
|
|
||||||
filter: saturate(0.5);
|
|
||||||
opacity: 0.64;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapperRecent:not(:hover) {
|
.wrapperRecent:not(:hover) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue