feishin/src/remote/components/buttons/remote-button.tsx
Jeff c1330d92b2
Migrate to Mantine v8 and Design Changes (#961)
* mantine v8 migration

* various design changes and improvements
2025-06-24 00:04:36 -07:00

29 lines
798 B
TypeScript

import clsx from 'clsx';
import { forwardRef, ReactNode, Ref } from 'react';
import styles from './remote-button.module.css';
import { Button, ButtonProps } from '/@/shared/components/button/button';
interface RemoteButtonProps extends ButtonProps {
children: ReactNode;
isActive?: boolean;
ref: Ref<HTMLButtonElement>;
}
export const RemoteButton = forwardRef<HTMLButtonElement, RemoteButtonProps>(
({ children, isActive, tooltip, ...props }, ref) => {
return (
<Button
className={clsx(styles.button, {
[styles.active]: isActive,
})}
tooltip={tooltip}
{...props}
ref={ref}
>
{children}
</Button>
);
},
);