Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Commit

Permalink
Revert change that led to unshown status marks
Browse files Browse the repository at this point in the history
  • Loading branch information
TerrenceLJones committed Feb 17, 2021
1 parent 1e1b6c9 commit 0da0946
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/components/CheckMarkCard/CheckMarkCard.css.js
Expand Up @@ -67,16 +67,12 @@ export const MarkUI = styled('div')`
height: 28px;
width: 28px;
border-radius: 4px 0px 5px;
opacity: 0;
opacity: ${({ markShown }) => (markShown ? '1' : '0')};
transition: opacity 0.15s cubic-bezier(0.55, 0, 1, 0.45);
will-change: opacity;
background-color: ${({ color }) => color};
z-index: 100;
&.card-checked {
opacity: 1;
}
.mark-icon {
color: white;
position: absolute;
Expand Down
17 changes: 10 additions & 7 deletions src/components/CheckMarkCard/CheckMarkCard.jsx
Expand Up @@ -82,11 +82,16 @@ export class CheckMarkCard extends React.Component {
renderMark = () => {
const { withStatus } = this.props
const { cardChecked } = this.state
let iconName = 'checkmark'
let iconSize = '24'
let color = getColor('blue.500')
let iconName
let iconSize
let color
let tooltip

if (cardChecked) {
iconName = 'checkmark'
iconSize = '24'
color = getColor('blue.500')
}
// If the card has a status provided, it should take precedence even if the card
// is checked from external props for some reason
if (withStatus) {
Expand All @@ -100,11 +105,9 @@ export class CheckMarkCard extends React.Component {
// so we can animate the transition
return (
<MarkUI
className={classNames(
'c-CheckMarkCard__mark',
cardChecked && 'card-checked'
)}
className="c-CheckMarkCard__mark"
color={color}
markShown={Boolean(iconName)}
>
{Boolean(tooltip) ? (
<Tooltip
Expand Down

0 comments on commit 0da0946

Please sign in to comment.