-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70f646d
commit f7819c8
Showing
5 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import PaymentCard from './PaymentCard.twig'; | ||
|
||
export default { | ||
title: 'Design System/Organisms/Card/PaymentCard' | ||
}; | ||
|
||
export const Base = { | ||
render: (args) => `<div class='w-[340px]''>${PaymentCard(args)}</div>`, | ||
args: { | ||
title: 'Prénom NOM', | ||
number: '**** **** **** 0000', | ||
expired: false, | ||
cardType: 'VISA', | ||
date: '05/25', | ||
withoutButton: false | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class='PaymentCard'> | ||
<div class='PaymentCard-icon'><span>{{ source("/icons/calendar.svg") }}</span></div> | ||
<div class='PaymentCard-title'>{{ title }}</div> | ||
<div class='{% if not expired %}flex flex-cols items-end justify-between {% endif %}'> | ||
<div class='PaymentCard-content'> | ||
<div class='font-semibold'>{{ cardType }}</div> | ||
<div>N° {{ number }}</div> | ||
{% if expired %} | ||
<div class='font-bold text-error-dark'>Expirée</div> | ||
{% else %} | ||
<div>Expire le {{ date }}</div> | ||
{% endif %} | ||
</div> | ||
{% if not withoutButton %} | ||
<div class='{% if expired %}mt-2 flex gap-2{% endif %}'> | ||
{% include '../../../Molecules/Button/Button.twig' with {classes: 'Button--small',text:'Supprimer', icon_left: 'delete'} %} | ||
{% if expired %} | ||
{% include '../../../Molecules/Button/Button.twig' with {classes: 'Button--small', variant:'secondary', text:'Mettre à jour'} %} | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.PaymentCard { | ||
position: relative; | ||
border-radius: rem-convert(8px); | ||
border: 1px solid var(--theme-medium); | ||
background: var(--theme-lightest); | ||
padding: rem-convert(24px); | ||
&-icon { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
padding: rem-convert(20px); | ||
span { | ||
display: block; | ||
width: rem-convert(38px); | ||
height: rem-convert(38px); | ||
color: var(--theme-light); | ||
} | ||
} | ||
&-title { | ||
@apply paragraph-2; | ||
font-weight: 600; | ||
color: var(--black); | ||
} | ||
&-content { | ||
@apply paragraph-4; | ||
} | ||
} |