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