Skip to content

Commit

Permalink
oblique lines pattern for critical PIAF
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAC committed Oct 30, 2023
1 parent 9bbb7f9 commit 27b89d4
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/components/Piaf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ const Bordered = styled(Grid)`
margin-bottom: 2px;
`

const ClickableSlot = styled(Grid)<{ $isDemiPiaf: boolean }>`
background: ${({ $isDemiPiaf }) =>
$isDemiPiaf &&
`
linear-gradient(
135deg,
transparent 25%,
rgba(0, 0, 0, 0.1) 25%,
rgba(0, 0, 0, 0.1) 50%,
transparent 50%,
transparent 75%,
rgba(0, 0, 0, 0.1) 75%,
rgba(0, 0, 0, 0.1)
)
0 0 / 20px 20px repeat;
`};
`

interface Result {
creneau: Creneau
}
Expand Down Expand Up @@ -112,7 +130,7 @@ const Piaf = ({ piaf, allowValidate, critical }: Props) => {

return (
<Container container>
<Grid item xs={8}>
<ClickableSlot item xs={8} $isDemiPiaf={piaf.creneau.demiPiaf}>
<ListItem key={piaf.id} button onClick={handleClick}>
<ListItemAvatar>
<PiafCircle piaf={piaf} critical={critical} />
Expand All @@ -122,7 +140,7 @@ const Piaf = ({ piaf, allowValidate, critical }: Props) => {
secondary={`de ${formatTime(slot.start)} à ${formatTime(slot.end)}`}
/>
</ListItem>
</Grid>
</ClickableSlot>
<Grid item xs={4}>
{allowValidate && (
<FormGroup>
Expand Down

0 comments on commit 27b89d4

Please sign in to comment.