* fix(SW-1563): Added new IconButton component to the design system and removed Icon variant inside the Button component * fix(SW-1563): Added buttons around clickable images and changed to design system components * fix(SW-1563): Renamed variants to match Figma * fix(SW-1563): Renamed AriaButton to ButtonRAC Approved-by: Michael Zetterberg Approved-by: Matilda Landström
21 lines
375 B
TypeScript
21 lines
375 B
TypeScript
import { Button as ButtonRAC } from 'react-aria-components'
|
|
|
|
import { variants } from './variants'
|
|
|
|
import type { IconButtonProps } from './types'
|
|
|
|
export function IconButton({
|
|
theme,
|
|
style,
|
|
className,
|
|
...props
|
|
}: IconButtonProps) {
|
|
const classNames = variants({
|
|
theme,
|
|
style,
|
|
className,
|
|
})
|
|
|
|
return <ButtonRAC {...props} className={classNames} />
|
|
}
|