From a63d2e432bb8a3a923528d998f3b7c10854b7b6e Mon Sep 17 00:00:00 2001 From: Professor S <84548711+Prof-SD@users.noreply.github.com> Date: Mon, 19 Dec 2022 07:49:59 -0800 Subject: [PATCH] Added favs svg --- src/components/Svg/Icons/Fav.tsx | 27 +++++++++++++++++++++++++++ src/components/Svg/Icons/index.ts | 1 + src/components/Svg/Svg.tsx | 4 ++++ src/components/Svg/types.ts | 1 + 4 files changed, 33 insertions(+) create mode 100644 src/components/Svg/Icons/Fav.tsx diff --git a/src/components/Svg/Icons/Fav.tsx b/src/components/Svg/Icons/Fav.tsx new file mode 100644 index 00000000..5fda7345 --- /dev/null +++ b/src/components/Svg/Icons/Fav.tsx @@ -0,0 +1,27 @@ +/** @jsxImportSource theme-ui */ +import React from "react"; +import { SvgProps, rotation } from "./types"; + +const Fav: React.FC = ({ direction = "down", color = "text", width, getStyles }) => { + const deg: rotation = { + left: 90, + up: 180, + right: 270, + down: 0, + }; + const style = getStyles({ + degree: deg[direction as keyof rotation], + color, + }); + + return ( + + + + ); +}; + +export default Fav; diff --git a/src/components/Svg/Icons/index.ts b/src/components/Svg/Icons/index.ts index 6fb7cb3a..c18baee5 100644 --- a/src/components/Svg/Icons/index.ts +++ b/src/components/Svg/Icons/index.ts @@ -46,3 +46,4 @@ export { default as Migrate } from "./Migrate"; export { default as Message } from "./Message"; export { default as Positions } from "./Positions"; export { default as MenuSettings } from "./MenuSettings"; +export { default as Fav } from "./Fav"; diff --git a/src/components/Svg/Svg.tsx b/src/components/Svg/Svg.tsx index a3706cb3..f0567090 100644 --- a/src/components/Svg/Svg.tsx +++ b/src/components/Svg/Svg.tsx @@ -51,6 +51,7 @@ import { Message, Positions, MenuSettings, + Fav } from "./Icons"; import { BSC, BANANA, BNB, ETH, GNANA, POLYGON, TLOS } from "./tokens"; import { IconStyles } from "./Icons/types"; @@ -227,6 +228,9 @@ const Svg: React.FC = ({ icon, ...props }: any) => { if (icon === icons.MENU_SETTINGS) { return ; } + if (icon === icons.FAV) { + return ; + } return null; }; diff --git a/src/components/Svg/types.ts b/src/components/Svg/types.ts index f3eacf0f..526ddff4 100644 --- a/src/components/Svg/types.ts +++ b/src/components/Svg/types.ts @@ -60,6 +60,7 @@ export enum icons { MESSAGE = "message", POSITIONS = "Positions", MENU_SETTINGS = "MenuSettings", + FAV = "Fav", } export enum directions {