mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-28 00:27:26 +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,
|
||||
Text
|
||||
} from '@chakra-ui/react';
|
||||
import { AddIcon, MinusIcon } from '@chakra-ui/icons';
|
||||
import { AddIcon, MinusIcon } from '../svgs/'
|
||||
import NextLink from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
|
|
@ -79,9 +79,9 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => {
|
|||
<Stack minW='61px'>
|
||||
<Center>
|
||||
{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>
|
||||
</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 './GopherDownloads';
|
||||
export * from './GopherHomeFront';
|
||||
export * from './GopherHomeLinks';
|
||||
export * from './GopherHomeNodes';
|
||||
export * from './MinusIcon';
|
||||
|
|
|
|||
Loading…
Reference in a new issue