Creation composant input

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2025-11-08 18:47:51 +01:00
parent 7bc9b291b2
commit ed6ef51d4c
2 changed files with 45 additions and 0 deletions
+13
View File
@@ -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;
+32
View File
@@ -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;
}