ui(admin): update button components, fix Editor for eggs

This commit is contained in:
Matthew Penner 2022-12-21 14:27:50 -07:00
parent 4e56f6dbea
commit 089860b721
No known key found for this signature in database
35 changed files with 363 additions and 623 deletions

View file

@ -1,15 +1,25 @@
import { forwardRef } from 'react';
import * as React from 'react';
import classNames from 'classnames';
import type { ComponentProps } from 'react';
import { forwardRef } from 'react';
import styles from './styles.module.css';
type Props = Omit<React.ComponentProps<'input'>, 'type'>;
type Props = Omit<ComponentProps<'input'>, 'type'> & {
indeterminate?: boolean;
};
export default forwardRef<HTMLInputElement, Props>(({ className, ...props }, ref) => (
export default forwardRef<HTMLInputElement, Props>(({ className, indeterminate, ...props }, ref) => (
<input
ref={ref}
type={'checkbox'}
className={classNames('form-input', styles.checkbox_input, className)}
className={classNames(
'form-checkbox',
{
[styles.checkbox]: true,
[styles.indeterminate]: indeterminate,
},
className,
)}
{...props}
/>
));