import React from 'react'
import classnames from 'classnames'
import type { ButtonHTMLAttributes } from 'react'
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'name'> {
id?: string
name?: string
primary?: boolean
secondary?: boolean
small?: boolean
large?: boolean
link?: boolean
}
export const Button: React.FC<ButtonProps> = ({
id,
children,
className,
name,
primary = false,
secondary = false,
small = false,
large = false,
link = false,
type = 'button',
onClick,
...props
}) =>
<button
id={id ?? name}
name={name}
type={type}
{...props}
onClick={event => {
if (onClick) {
event.preventDefault()
onClick(event)
}
}}
className={classnames('button', className, {
'button-primary': primary,
'button-secondary': secondary,
'button-large': large,
'button-small': small,
'button-link': link
})}
>
{children}
</button>
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| icons/ | 2026-07-30 21:37 | 2.3 KB | 76129f60960:kunden | dxwrx-r--r | |
| Badge.tsx | 2026-07-30 21:37 | 838 B | 76129f60960:kunden | -xw-x----- | |
| Button.tsx | 2026-07-30 21:37 | 929 B | 76129f60960:kunden | -xw-x----- | |
| ConfirmDialog.tsx | 2026-07-30 21:37 | 1.1 KB | 76129f60960:kunden | -xw-x----- | |
| CopyToClipboardButton.tsx | 2026-07-30 21:37 | 1.64 KB | 76129f60960:kunden | -xw-x----- | |
| DismissableNotice.tsx | 2026-07-30 21:37 | 700 B | 76129f60960:kunden | -xw-x----- | |
| SubmitButton.tsx | 2026-07-30 21:37 | 913 B | 76129f60960:kunden | -xw-x----- | |
| Tooltip.tsx | 2026-07-30 21:37 | 681 B | 76129f60960:kunden | -xw-x----- | |
| UpsellBanner.tsx | 2026-07-30 21:37 | 1.16 KB | 76129f60960:kunden | -xw-x----- | |
| UpsellDialog.tsx | 2026-07-30 21:37 | 2.11 KB | 76129f60960:kunden | -xw-x----- | |