From 43cbd0211bbe6c8ee10c6d7dd107a749e59cc3d6 Mon Sep 17 00:00:00 2001 From: newick Date: Tue, 5 Nov 2019 11:08:12 +0100 Subject: [PATCH] feat(ContributorButton): added checkmark when subscribed --- src/components/atoms/icons/CheckSmall.tsx | 10 ++++++++++ .../organisms/Contributor/ContributorButton.tsx | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/components/atoms/icons/CheckSmall.tsx diff --git a/src/components/atoms/icons/CheckSmall.tsx b/src/components/atoms/icons/CheckSmall.tsx new file mode 100644 index 000000000..647b24a4d --- /dev/null +++ b/src/components/atoms/icons/CheckSmall.tsx @@ -0,0 +1,10 @@ +import React from 'react'; + +export default () => ( + + + +); diff --git a/src/components/organisms/Contributor/ContributorButton.tsx b/src/components/organisms/Contributor/ContributorButton.tsx index 4d2046080..166a51bbc 100644 --- a/src/components/organisms/Contributor/ContributorButton.tsx +++ b/src/components/organisms/Contributor/ContributorButton.tsx @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import styled from 'styled-components'; import BackgroundButton from 'components/atoms/Button/BackgroundButton/BackgroundButton'; import BorderButton from 'components/atoms/Button/BorderButton/BorderButton'; +import Check from 'components/atoms/icons/CheckSmall'; const Container = styled.div` display: flex; @@ -54,7 +55,14 @@ const ContributorButton = ({ onPointerEnter={() => setSubscribedButtonHovered(true)} onPointerLeave={() => setSubscribedButtonHovered(false)} > - {subscribedButtonHovered ? 'Se désabonner' : 'Abonné·e'} + {subscribedButtonHovered ? ( + 'Se désabonner' + ) : ( + <> + +  Abonné + + )} )} {!subscribed && (