mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 11:36:37 +00:00
* add custom AddIcon and MinusIcon svgs * switch DocsLinks to use custom +/- svgs * fix size of +/- svgs
This commit is contained in:
parent
0bddab847d
commit
8b1b80604e
4 changed files with 46 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ import {
|
||||||
Stack,
|
Stack,
|
||||||
Text
|
Text
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { AddIcon, MinusIcon } from '@chakra-ui/icons';
|
import { AddIcon, MinusIcon } from '../svgs/'
|
||||||
import NextLink from 'next/link';
|
import NextLink from 'next/link';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
|
|
||||||
|
|
@ -79,9 +79,9 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => {
|
||||||
<Stack minW='61px'>
|
<Stack minW='61px'>
|
||||||
<Center>
|
<Center>
|
||||||
{isExpanded ? (
|
{isExpanded ? (
|
||||||
<MinusIcon w='20px' h='20px' color='primary' />
|
<MinusIcon w='24px' h='24px' color='primary' />
|
||||||
) : (
|
) : (
|
||||||
<AddIcon w='20px' h='20px' color='primary' />
|
<AddIcon w='24px' h='24px' color='primary' />
|
||||||
)}
|
)}
|
||||||
</Center>
|
</Center>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
|
||||||
21
src/components/UI/svgs/AddIcon.tsx
Normal file
21
src/components/UI/svgs/AddIcon.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import { IconProps } from '@chakra-ui/react';
|
||||||
|
import { createIcon } from '@chakra-ui/icons';
|
||||||
|
|
||||||
|
const [w, h] = [24, 24];
|
||||||
|
|
||||||
|
const Icon = createIcon({
|
||||||
|
displayName: 'AddIcon',
|
||||||
|
viewBox: `0 0 ${w} ${h}`,
|
||||||
|
path: (
|
||||||
|
<svg width={w} height={h} fill='none' xmlns='http://www.w3.org/2000/svg'>
|
||||||
|
<g fill="currentColor">
|
||||||
|
<rect height="2" width="20" x="2" y="11"></rect>
|
||||||
|
<rect height="20" width="2" x="11" y="2"></rect>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
export const AddIcon: React.FC<IconProps> = props => (
|
||||||
|
<Icon h={h} w={w} color='primary' {...props} />
|
||||||
|
);
|
||||||
20
src/components/UI/svgs/MinusIcon.tsx
Normal file
20
src/components/UI/svgs/MinusIcon.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { IconProps } from '@chakra-ui/react';
|
||||||
|
import { createIcon } from '@chakra-ui/icons';
|
||||||
|
|
||||||
|
const [w, h] = [24, 24];
|
||||||
|
|
||||||
|
const Icon = createIcon({
|
||||||
|
displayName: 'MinusIcon',
|
||||||
|
viewBox: `0 0 ${w} ${h}`,
|
||||||
|
path: (
|
||||||
|
<svg width={w} height={h} fill='none' xmlns='http://www.w3.org/2000/svg'>
|
||||||
|
<g fill="currentColor">
|
||||||
|
<rect height="2" width="20" x="2" y="11"></rect>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
export const MinusIcon: React.FC<IconProps> = props => (
|
||||||
|
<Icon h={h} w={w} color='primary' {...props} />
|
||||||
|
);
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
export * from './AddIcon';
|
||||||
export * from './GlyphHome';
|
export * from './GlyphHome';
|
||||||
export * from './GopherDownloads';
|
export * from './GopherDownloads';
|
||||||
export * from './GopherHomeFront';
|
export * from './GopherHomeFront';
|
||||||
export * from './GopherHomeLinks';
|
export * from './GopherHomeLinks';
|
||||||
export * from './GopherHomeNodes';
|
export * from './GopherHomeNodes';
|
||||||
|
export * from './MinusIcon';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue