From e145ef983e64ba1ab0ffacf0e3e9eae94db1d8e4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 4 Jan 2022 12:13:24 +0100 Subject: chore(icons): add direction to arrow icon and split path I can now animate separatly the arrow head and the arrow body. --- src/components/Icons/Arrow/Arrow.tsx | 69 ++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) (limited to 'src/components') diff --git a/src/components/Icons/Arrow/Arrow.tsx b/src/components/Icons/Arrow/Arrow.tsx index 61edfca..e9131d1 100644 --- a/src/components/Icons/Arrow/Arrow.tsx +++ b/src/components/Icons/Arrow/Arrow.tsx @@ -1,6 +1,65 @@ import styles from './Arrow.module.scss'; -const ArrowIcon = () => { +type ArrowDirection = 'top' | 'right' | 'bottom' | 'left'; + +const ArrowIcon = ({ direction = 'right' }: { direction?: ArrowDirection }) => { + if (direction === 'top') { + return ( + + + + + ); + } + + if (direction === 'bottom') { + return ( + + + + + ); + } + + if (direction === 'left') { + return ( + + + + + ); + } + return ( { xmlns="http://www.w3.org/2000/svg" > + ); -- cgit v1.2.3