add button type="icon"

This commit is contained in:
2023-10-09 13:23:29 +02:00
parent 5e37027dbf
commit 27da2dc299
2 changed files with 10 additions and 1 deletions

View File

@@ -100,3 +100,12 @@
color: var(--color-accent-500);
text-decoration-line: underline;
}
.icon {
all: unset;
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
justify-content: center;
}

View File

@@ -5,7 +5,7 @@ import s from './button.module.scss'
export type ButtonProps<T extends ElementType = 'button'> = {
as?: T
children: ReactNode
variant?: 'primary' | 'secondary' | 'tertiary' | 'link'
variant?: 'primary' | 'secondary' | 'tertiary' | 'link' | 'icon'
fullWidth?: boolean
className?: string
} & ComponentPropsWithoutRef<T>