From 4d2974e383fd56eb76ff99106da60fc43dd00d38 Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Mon, 6 Dec 2021 15:21:34 +0000 Subject: [PATCH] add custom nav icons --- nym-wallet/src/components/Nav.tsx | 27 ++++++++----------------- nym-wallet/src/svg-icons/bond.tsx | 24 ++++++++++++++++++++++ nym-wallet/src/svg-icons/delegate.tsx | 14 +++++++++++++ nym-wallet/src/svg-icons/index.ts | 4 ++++ nym-wallet/src/svg-icons/unbond.tsx | 19 +++++++++++++++++ nym-wallet/src/svg-icons/undelegate.tsx | 15 ++++++++++++++ 6 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 nym-wallet/src/svg-icons/bond.tsx create mode 100644 nym-wallet/src/svg-icons/delegate.tsx create mode 100644 nym-wallet/src/svg-icons/index.ts create mode 100644 nym-wallet/src/svg-icons/unbond.tsx create mode 100644 nym-wallet/src/svg-icons/undelegate.tsx diff --git a/nym-wallet/src/components/Nav.tsx b/nym-wallet/src/components/Nav.tsx index 25358566a5..d056cc637c 100644 --- a/nym-wallet/src/components/Nav.tsx +++ b/nym-wallet/src/components/Nav.tsx @@ -1,18 +1,9 @@ import React, { useContext, useEffect } from 'react' import { Link, useLocation } from 'react-router-dom' import { List, ListItem, ListItemIcon, ListItemText } from '@mui/material' -import { - AccountBalanceWalletOutlined, - ArrowBack, - ArrowForward, - AttachMoney, - CancelOutlined, - HowToVoteOutlined, - MoneyOff, - Description, - Settings, -} from '@mui/icons-material' +import { AccountBalanceWalletOutlined, ArrowBack, ArrowForward, Description, Settings } from '@mui/icons-material' import { ADMIN_ADDRESS, ClientContext } from '../context/main' +import { Bond, Delegate, Unbond, Undelegate } from '../svg-icons' let routesSchema = [ { @@ -33,22 +24,22 @@ let routesSchema = [ { label: 'Bond', route: '/bond', - Icon: AttachMoney, + Icon: Bond, }, { label: 'Unbond', route: '/unbond', - Icon: MoneyOff, + Icon: Unbond, }, { label: 'Delegate', route: '/delegate', - Icon: HowToVoteOutlined, + Icon: Delegate, }, { label: 'Undelegate', route: '/undelegate', - Icon: CancelOutlined, + Icon: Undelegate, }, ] @@ -80,16 +71,14 @@ export const Nav = () => { diff --git a/nym-wallet/src/svg-icons/bond.tsx b/nym-wallet/src/svg-icons/bond.tsx new file mode 100644 index 0000000000..6870c7cfe7 --- /dev/null +++ b/nym-wallet/src/svg-icons/bond.tsx @@ -0,0 +1,24 @@ +import React from 'react' +import { SvgIcon, SvgIconProps } from '@mui/material' + +export const Bond = (props: SvgIconProps) => { + return ( + + + + + + ) +} diff --git a/nym-wallet/src/svg-icons/delegate.tsx b/nym-wallet/src/svg-icons/delegate.tsx new file mode 100644 index 0000000000..03a80ed9c0 --- /dev/null +++ b/nym-wallet/src/svg-icons/delegate.tsx @@ -0,0 +1,14 @@ +import React from 'react' +import { SvgIcon, SvgIconProps } from '@mui/material' + +export const Delegate = (props: SvgIconProps) => { + return ( + + + + + + + + ) +} diff --git a/nym-wallet/src/svg-icons/index.ts b/nym-wallet/src/svg-icons/index.ts new file mode 100644 index 0000000000..b13c4591ba --- /dev/null +++ b/nym-wallet/src/svg-icons/index.ts @@ -0,0 +1,4 @@ +export * from './delegate' +export * from './undelegate' +export * from './bond' +export * from './unbond' diff --git a/nym-wallet/src/svg-icons/unbond.tsx b/nym-wallet/src/svg-icons/unbond.tsx new file mode 100644 index 0000000000..ccd58b0b8b --- /dev/null +++ b/nym-wallet/src/svg-icons/unbond.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import { SvgIcon, SvgIconProps } from '@mui/material' + +export const Unbond = (props: SvgIconProps) => { + return ( + + + + + ) +} diff --git a/nym-wallet/src/svg-icons/undelegate.tsx b/nym-wallet/src/svg-icons/undelegate.tsx new file mode 100644 index 0000000000..0599b3f207 --- /dev/null +++ b/nym-wallet/src/svg-icons/undelegate.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import { SvgIcon, SvgIconProps } from '@mui/material' + +export const Undelegate = (props: SvgIconProps) => { + return ( + + + + + + + + + ) +}