Creation composant input
This commit is contained in:
@@ -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;
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
.input {
|
||||||
|
border: 1px solid rgba(200, 200, 200, 0.3);
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
-webkit-backdrop-filter: blur(10px);
|
||||||
|
color: #000;
|
||||||
|
font-size: 16px;
|
||||||
|
outline: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
width: fit-content;
|
||||||
|
padding: 8px 10px 8px 10px;
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input::placeholder {
|
||||||
|
color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input:focus {
|
||||||
|
border-color: rgba(200, 200, 200, 0.6);
|
||||||
|
box-shadow: 0 4px 30px rgba(255, 255, 255, 0.2);
|
||||||
|
background: rgba(255, 255, 255, 0.38);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rounded {
|
||||||
|
border-radius: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user