mirror of
https://github.com/aleleba/react-list-ui-library.git
synced 2025-05-01 16:37:48 -06:00
22 lines
540 B
TypeScript
22 lines
540 B
TypeScript
import React, { FC, ChangeEventHandler } from 'react';
|
|
import './style.scss';
|
|
|
|
export type TInputProps = {
|
|
/**
|
|
* Is this the text you want to add to the input placeholder
|
|
*/
|
|
placeholder?: string
|
|
/**
|
|
* Is this the onChange event of the input
|
|
*/
|
|
onChange?: ChangeEventHandler<HTMLInputElement>
|
|
};
|
|
|
|
export const Input:FC<TInputProps> = ({
|
|
placeholder = '',
|
|
onChange = (e) => {}
|
|
}) => {
|
|
return(
|
|
<input className='input' placeholder={placeholder} type='text' onChange={onChange} />
|
|
)
|
|
} |