extract rgba resolving to provider
This commit is contained in:
parent
102c084328
commit
e8238c6ea7
1 changed files with 112 additions and 54 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import {ChangeEventHandler} from "react";
|
||||
import './TextInput.css';
|
||||
|
||||
export default function TextInput(props: {
|
||||
export default function TextInput( {onChange, className, value, placeholder, onEnter }: {
|
||||
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
|
||||
className?: string;
|
||||
value: string;
|
||||
|
|
@ -9,13 +9,14 @@ export default function TextInput(props: {
|
|||
onEnter?: () => void;
|
||||
}) {
|
||||
return <input
|
||||
{...props}
|
||||
type="text"
|
||||
className={'TextInput ' + (props.className?? '')}
|
||||
|
||||
className={'TextInput ' + (className?? '')}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
onKeyUp={event => {
|
||||
if (props.onEnter && event.key === 'Enter')
|
||||
props.onEnter();
|
||||
if (onEnter && event.key === 'Enter')
|
||||
onEnter();
|
||||
}}
|
||||
/>;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue