1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00
Files
Radarr/frontend/src/Components/Link/Button.tsx
Bogdan 3f35b7c782 Convert Calendar to TypeScript
(cherry picked from commit 811eb36c7b1a5124270ff93d18d16944e654de81)

Co-authored-by: Mark McDowall <mark@mcdowall.ca>

Closes #10764
Closes #10776
Closes #10781
2025-05-29 17:14:07 +03:00

36 lines
979 B
TypeScript

import classNames from 'classnames';
import React from 'react';
import { kinds, sizes } from 'Helpers/Props';
import { Align } from 'Helpers/Props/align';
import { Kind } from 'Helpers/Props/kinds';
import { Size } from 'Helpers/Props/sizes';
import Link, { LinkProps } from './Link';
import styles from './Button.css';
export interface ButtonProps extends Omit<LinkProps, 'children' | 'size'> {
buttonGroupPosition?: Extract<Align, keyof typeof styles>;
kind?: Extract<Kind, keyof typeof styles>;
size?: Extract<Size, keyof typeof styles>;
children: Required<LinkProps['children']>;
}
export default function Button({
className = styles.button,
buttonGroupPosition,
kind = kinds.DEFAULT,
size = sizes.MEDIUM,
...otherProps
}: ButtonProps) {
return (
<Link
className={classNames(
className,
styles[kind],
styles[size],
buttonGroupPosition && styles[buttonGroupPosition]
)}
{...otherProps}
/>
);
}