From dfecabc649d3ddadd00617281a99cf78fe7a0070 Mon Sep 17 00:00:00 2001 From: Nathan Seva Date: Wed, 20 Dec 2023 16:05:47 +0100 Subject: [PATCH] customize massa logo colors (#378) * customize massa logo colors * update story massa logo * fix color --- src/components/Icons/Svg/Massa/MassaLogo.tsx | 20 +++++++++++++++----- src/components/Icons/Svg/SvgIcon.stories.tsx | 6 ++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/Icons/Svg/Massa/MassaLogo.tsx b/src/components/Icons/Svg/Massa/MassaLogo.tsx index 7b13c0aa..59293e93 100644 --- a/src/components/Icons/Svg/Massa/MassaLogo.tsx +++ b/src/components/Icons/Svg/Massa/MassaLogo.tsx @@ -6,10 +6,20 @@ import { ComponentPropsWithoutRef } from 'react'; interface SVGProps extends ComponentPropsWithoutRef<'div'> { size?: number; + primaryColor?: string; + secondaryColor?: string; } export function MassaLogo(props: SVGProps) { - let { size, ...rest } = props; + let { size, primaryColor, secondaryColor, ...rest } = props; + + if (!primaryColor) { + primaryColor = '#FF0000'; + } + + if (!secondaryColor) { + secondaryColor = 'white'; + } return (
diff --git a/src/components/Icons/Svg/SvgIcon.stories.tsx b/src/components/Icons/Svg/SvgIcon.stories.tsx index 4eb8ee2b..26604408 100644 --- a/src/components/Icons/Svg/SvgIcon.stories.tsx +++ b/src/components/Icons/Svg/SvgIcon.stories.tsx @@ -17,6 +17,12 @@ export const _MassaLogo = { render: () => , }; +export const _MassaLogoCustomColors = { + render: () => ( + + ), +}; + export const _MassaWallet = { render: () => , };