mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-17 05:09:29 +00:00
add button type="icon"
This commit is contained in:
@@ -100,3 +100,12 @@
|
|||||||
color: var(--color-accent-500);
|
color: var(--color-accent-500);
|
||||||
text-decoration-line: underline;
|
text-decoration-line: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
all: unset;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import s from './button.module.scss'
|
|||||||
export type ButtonProps<T extends ElementType = 'button'> = {
|
export type ButtonProps<T extends ElementType = 'button'> = {
|
||||||
as?: T
|
as?: T
|
||||||
children: ReactNode
|
children: ReactNode
|
||||||
variant?: 'primary' | 'secondary' | 'tertiary' | 'link'
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'link' | 'icon'
|
||||||
fullWidth?: boolean
|
fullWidth?: boolean
|
||||||
className?: string
|
className?: string
|
||||||
} & ComponentPropsWithoutRef<T>
|
} & ComponentPropsWithoutRef<T>
|
||||||
|
|||||||
Reference in New Issue
Block a user