New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add separator to mark last turn transition #68
Conversation
{props.cardsThisTurn === index + 1 && index !== 5 && ( | ||
<CardLogSeparator /> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think inserting an extra element alongside the columns is necessary. I think we should be able to apply an extra class to all cards that are the first in a turn. Something like:
<Image
wrapperClassName={[
'DryRunnerCardLog__image-wrapper',
props.cardsThisTurn === index + 1 &&
index !== 5 &&
'DryRunnerCardLog__image-wrapper--turn',
].filter(Boolean)}
className='DryRunnerCardLog__image'
src={card.image}
alt={card.name}
onClick={() => setZoomedCard(card)}
data-testid='card-log-image'
/>
Then on the CSS:
.DryRunnerCardLog__image-wrapper--turn::after {
content: '';
position: absolute;
right: -0.5em;
height: 80%;
top: 50%;
width: 1px;
transform: translateY(-50%);
background: linear-gradient(
to bottom,
transparent,
var(--dark-beige),
transparent
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and for the pseudo element to be able to be absolutely positioned, .DryRunnerCardLog__image-wrapper
needs to be position: relative
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great it looks amazing!!
@@ -6,7 +6,7 @@ import Row from '../Row' | |||
import arrayPad from '../../helpers/arrayPad' | |||
import './index.css' | |||
|
|||
const DryRunnerCardLog = React.memo(props => { | |||
export default React.memo(function DryRunnerCardLog(props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
No description provided.