Icon line weight patch [Fixes #70] (#105)

* add custom AddIcon and MinusIcon svgs

* switch DocsLinks to use custom +/- svgs

* fix size of +/- svgs
This commit is contained in:
Paul Wackerow 2022-12-05 17:31:39 +01:00 committed by GitHub
parent 0bddab847d
commit 8b1b80604e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 3 deletions

View file

@ -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>

View 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} />
);

View 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} />
);

View file

@ -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';