Creation composant input
This commit is contained in:
1 parent
7bc9b291b2
commit
ed6ef51d4c
2 files changed
+45
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import styles from "./input.module.css";
|
||||
|
||||
const TextInput = ({ placeholder, onChange, value, borderStyle, ...props }) => {
|
||||
|
||||
|
||||
let inputBorderStyle = styles.square;
|
||||
if (borderStyle === "square") inputBorderStyle = styles.square;
|
||||
if(borderStyle === "rounded") inputBorderStyle = styles.rounded;
|
||||
|
||||
return <input className={`${styles.input} ${inputBorderStyle}`} onChange={onChange} placeholder={placeholder} value={value} {...props} />
|
||||
};
|
||||
|
||||
export default TextInput;
|
||||
Reference in new issue
Block a user