mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(app): introduce button selector component [EE-2004] (#6112)
This commit is contained in:
parent
17a20cb2c6
commit
8e83a95996
5 changed files with 101 additions and 2 deletions
|
@ -1,17 +1,19 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
type Size = 'xsmall' | 'small' | 'large';
|
||||
export type Size = 'xsmall' | 'small' | 'large';
|
||||
export interface Props {
|
||||
size?: Size;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ButtonGroup({
|
||||
size = 'small',
|
||||
children,
|
||||
className,
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
<div className={clsx('btn-group', sizeClass(size))} role="group">
|
||||
<div className={clsx('btn-group', sizeClass(size), className)} role="group">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue