Skip to content

Commit 0eee25d

Browse files
committed
Transporter
1 parent 24627d9 commit 0eee25d

File tree

5 files changed

+92
-0
lines changed

5 files changed

+92
-0
lines changed

assets/images/chronopost.svg

Lines changed: 12 additions & 0 deletions
Loading

components/Atoms/Form/checkbox.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
.checkmark {
2929
width: 16px;
3030
height: 16px;
31+
background: var(--white);
3132
border: 1px solid var(--current-checkbox-color);
3233
border-radius: 2px;
3334
position: relative;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Transporter from './Transporter.twig';
2+
3+
export default {
4+
title: 'Design System/Organisms/Card/Transporter'
5+
};
6+
7+
export const Base = {
8+
render: (args) => `<div class='w-[340px]'>${Transporter(args)}</div>`,
9+
args: {
10+
selected: false,
11+
title: 'Nom du transporteur',
12+
date: 'JJ/MM',
13+
price: '7,80€',
14+
img: {alt: 'Logo Chronopost', src: "/images/chronopost.svg"}
15+
}
16+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class='Transporter {% if selected %}selected{% endif %}'>
2+
<label class='Transporter-content'>
3+
{% include '../../../Atoms/Form/Radio.twig' with {type:"span", name:"transporter", value:1, checked:selected} %}
4+
5+
<span>
6+
<span class='Transporter-title'>{{ title }}</span>
7+
<span class='Transporter-description'>Livraison estimée le {{ date }}</span>
8+
<span class='Transporter-bottom'>
9+
<span>{{ price }}</span>
10+
{% if img.src %}
11+
<img src="{{ img.src }}" alt="{{ img.alt|default('Logo transporteur') }}" loading="lazy">
12+
{% endif %}
13+
</span>
14+
</span>
15+
</label>
16+
</div>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.Transporter {
2+
background: var(--theme-lightest);
3+
border: 1px solid var(--theme-lightest);
4+
border-radius: rem-convert(8px);
5+
padding: rem-convert(16px);
6+
7+
&.selected {
8+
background: var(--theme-lighter);
9+
border: 1px solid var(--theme-medium);
10+
}
11+
label {
12+
cursor: pointer;
13+
}
14+
&-content {
15+
display: flex;
16+
align-items: flex-start;
17+
span {
18+
display: block;
19+
}
20+
> span:last-child {
21+
flex-grow: 1;
22+
}
23+
.Radio {
24+
margin-top: 4px;
25+
margin-right: 8px;
26+
}
27+
28+
.Transporter-bottom {
29+
padding-top: rem-convert(16px);
30+
@apply paragraph-4;
31+
font-weight: 600;
32+
display: flex;
33+
justify-content: space-between;
34+
align-items: center;
35+
}
36+
}
37+
&-title {
38+
@apply paragraph-2;
39+
font-weight: 600;
40+
color: var(--black);
41+
}
42+
&-description {
43+
@apply paragraph-6;
44+
font-weight: 400;
45+
color: var(--grey);
46+
}
47+
}

0 commit comments

Comments
 (0)