Files
web/packages/design-system/lib/components/FakeButton/index.tsx
Matilda Landström 93a90bef9d Merged in feat/SW-2038-static-map-button (pull request #2715)
feat(SW-2038): refactor and create wrapper for static map and button

* feat(SW-2038): refactor and create wrapper for static map and button

* feature: use button from design-system over creating a new one

* remove unused fragment

* fix(SW-2038): add removed css

* fix(SW-2038): update fake button component

* fix(SW-2038): move FakeButton to design system


Approved-by: Erik Tiekstra
Approved-by: Joakim Jäderberg
2025-09-01 08:16:27 +00:00

40 lines
766 B
TypeScript

'use client'
import { variants } from './variants'
import type { VariantProps } from 'class-variance-authority'
import type { ComponentProps, PropsWithChildren } from 'react'
import type { Button } from 'react-aria-components'
interface FakeButtonProps
extends PropsWithChildren,
Omit<ComponentProps<typeof Button>, 'children' | 'onPress'>,
VariantProps<typeof variants> {}
export function FakeButton({
variant,
color,
size,
typography,
children,
className,
...props
}: FakeButtonProps) {
const classNames = variants({
color,
size,
variant,
typography,
className,
})
return (
<span
className={classNames}
{...(props as React.HTMLProps<HTMLSpanElement>)}
>
{children}
</span>
)
}