diff --git a/assets/icons/calendar.svg b/assets/icons/calendar.svg index a70b032..434ed43 100644 --- a/assets/icons/calendar.svg +++ b/assets/icons/calendar.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/icons/delete.svg b/assets/icons/delete.svg index bb3ac7b..e890e03 100644 --- a/assets/icons/delete.svg +++ b/assets/icons/delete.svg @@ -1 +1,3 @@ - + + + diff --git a/components/Organisms/Card/Payment/Payment.stories.js b/components/Organisms/Card/Payment/Payment.stories.js new file mode 100644 index 0000000..d97ec83 --- /dev/null +++ b/components/Organisms/Card/Payment/Payment.stories.js @@ -0,0 +1,17 @@ +import PaymentCard from './PaymentCard.twig'; + +export default { + title: 'Design System/Organisms/Card/PaymentCard' +}; + +export const Base = { + render: (args) => `
${PaymentCard(args)}
`, + args: { + title: 'Prénom NOM', + number: '**** **** **** 0000', + expired: false, + cardType: 'VISA', + date: '05/25', + withoutButton: false + } +}; diff --git a/components/Organisms/Card/Payment/PaymentCard.twig b/components/Organisms/Card/Payment/PaymentCard.twig new file mode 100644 index 0000000..0f3d931 --- /dev/null +++ b/components/Organisms/Card/Payment/PaymentCard.twig @@ -0,0 +1,23 @@ +
+
{{ source("/icons/calendar.svg") }}
+
{{ title }}
+
+
+
{{ cardType }}
+
N° {{ number }}
+ {% if expired %} +
Expirée
+ {% else %} +
Expire le {{ date }}
+ {% endif %} +
+ {% if not withoutButton %} +
+ {% 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 %} +
+ {% endif %} +
+
diff --git a/components/Organisms/Card/Payment/payment.css b/components/Organisms/Card/Payment/payment.css new file mode 100644 index 0000000..eeca7a5 --- /dev/null +++ b/components/Organisms/Card/Payment/payment.css @@ -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; + } +}