Match-id-dc2d118d676e9ef910e7da00850f961c33cf80b4

This commit is contained in:
* 2022-04-07 11:49:21 +08:00 committed by *
parent e13f3245bd
commit 871fd3bd9b
3 changed files with 31 additions and 6 deletions

View File

@ -1,16 +1,16 @@
interface IArrow {
director: 'right' | 'down'
direction: 'up' | 'down'
}
export default function Arrow({ director }: IArrow) {
export default function Arrow({ direction: director }: IArrow) {
let d: string;
if (director === 'right') {
d = 'm2 0l12 8l-12 8 z';
if (director === 'up') {
d = 'M4 9.5 L5 10.5 L8 7.5 L11 10.5 L12 9.5 L8 5.5 z';
} else if (director === 'down') {
d = 'm0 2h16 l-8 12 z';
d = 'M5 5.5 L4 6.5 L8 10.5 L12 6.5 L11 5.5 L8 8.5z';
}
return (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='8px' height='8px'>
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='1rem' height='1rem'>
<path d={d} fill='currentColor' />
</svg>
);

View File

@ -0,0 +1,8 @@
export default function Close() {
return (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='1rem' height='1rem'>
<path d='M4 3 L3 4 L7 8 L3 12 L4 13 L8 9 L12 13 L13 12 L9 8 L13 4 L12 3 L8 7z' fill='currentColor' />
</svg>
);
}

View File

@ -0,0 +1,17 @@
interface IArrow {
director: 'right' | 'down'
}
export default function Triangle({ director }: IArrow) {
let d: string;
if (director === 'right') {
d = 'm2 0l12 8l-12 8 z';
} else if (director === 'down') {
d = 'm0 2h16 l-8 12 z';
}
return (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='8px' height='8px'>
<path d={d} fill='currentColor' />
</svg>
);
}