mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
Fix error positon property
* remove useless prop types
This commit is contained in:
@ -1,22 +1,17 @@
|
|||||||
import {
|
import { forwardRef, DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
||||||
ChangeEventHandler,
|
|
||||||
HTMLInputTypeAttribute,
|
|
||||||
KeyboardEventHandler,
|
|
||||||
forwardRef,
|
|
||||||
} from 'react';
|
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
|
|
||||||
interface Props {
|
interface Props
|
||||||
className?: string;
|
extends DetailedHTMLProps<
|
||||||
placeholder?: string;
|
InputHTMLAttributes<HTMLInputElement>,
|
||||||
value?: string | number | readonly string[] | undefined;
|
HTMLInputElement
|
||||||
type?: HTMLInputTypeAttribute | undefined;
|
> {}
|
||||||
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
|
|
||||||
onKeyUp?: KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
const RUAInput = forwardRef<HTMLInputElement, Props>(
|
const RUAInput = forwardRef<HTMLInputElement, Props>(
|
||||||
({ className, placeholder, value, onChange, onKeyUp, type }, ref) => {
|
(
|
||||||
|
{ className, placeholder, value, onChange, onKeyUp, type, ...rest },
|
||||||
|
ref
|
||||||
|
) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<input
|
<input
|
||||||
@ -34,6 +29,7 @@ const RUAInput = forwardRef<HTMLInputElement, Props>(
|
|||||||
value={value}
|
value={value}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
onKeyUp={onKeyUp}
|
onKeyUp={onKeyUp}
|
||||||
|
{...rest}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -22,7 +22,7 @@ const MainLayout: FC = ({ children }) => {
|
|||||||
>
|
>
|
||||||
<aside
|
<aside
|
||||||
className={cn(
|
className={cn(
|
||||||
'col-span-12 px-2 sticky top-8',
|
'col-span-12 px-2 top-8',
|
||||||
'md:col-span-3 lg:col-span-2 xl:col-span-1'
|
'md:col-span-3 lg:col-span-2 xl:col-span-1'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user