ui(admin): update button components, fix Editor for eggs
This commit is contained in:
parent
4e56f6dbea
commit
089860b721
35 changed files with 363 additions and 623 deletions
|
@ -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}
|
||||
/>
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue