correction css modal
This commit is contained in:
@@ -34,5 +34,4 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 20px;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,3 @@
|
|||||||
/*import { createPortal } from "react-dom";
|
|
||||||
import styles from "./modal.module.css";
|
|
||||||
import Button from "../button/button.jsx";
|
|
||||||
|
|
||||||
const Modal = ({ open, onClose, children, title }) => {
|
|
||||||
|
|
||||||
if (!open) return null;
|
|
||||||
|
|
||||||
const handleOverlayClick = () => {
|
|
||||||
onClose();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleModalClick = (e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
};
|
|
||||||
|
|
||||||
return createPortal(
|
|
||||||
<div className={styles.overlay} onClick={handleOverlayClick}>
|
|
||||||
<div className={styles.modal} onClick={handleModalClick}>
|
|
||||||
{title && <h2>{title}</h2>}
|
|
||||||
{children}
|
|
||||||
<div className={styles.modalFooter}>
|
|
||||||
<Button onClick={onClose}>Fermer</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>,
|
|
||||||
document.body
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Modal;*/
|
|
||||||
|
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import styles from "./Modal.module.css";
|
import styles from "./Modal.module.css";
|
||||||
import Button from "../Button/Button";
|
import Button from "../Button/Button";
|
||||||
|
|||||||
+18
-6
@@ -17,6 +17,13 @@ html {
|
|||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
--glass-back: rgba(255, 255, 255, 0.54);
|
||||||
|
--glass-border: rgba(255, 255, 255, 0.2);
|
||||||
|
--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
||||||
|
inset 0 -1px 0 rgba(255, 255, 255, 0.05),
|
||||||
|
inset 0 0 8px 4px rgba(255, 255, 255, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
@@ -51,18 +58,23 @@ body {
|
|||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.dark {
|
||||||
|
--glass-back: rgba(191, 191, 191, 0.54);
|
||||||
|
--glass-border: rgba(191, 191, 191, 0.2);
|
||||||
|
--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
|
||||||
|
inset 0 1px 0 rgba(191, 191, 191, 0.3),
|
||||||
|
inset 0 -1px 0 rgba(191, 191, 191, 0.05),
|
||||||
|
inset 0 0 8px 4px rgba(191, 191, 191, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
.glassCard {
|
.glassCard {
|
||||||
padding: 10px 20px 10px 20px;
|
padding: 10px 20px 10px 20px;
|
||||||
background: rgba(255, 255, 255, 0.54);
|
background: var(--glass-back);
|
||||||
backdrop-filter: blur(3px);
|
backdrop-filter: blur(3px);
|
||||||
-webkit-backdrop-filter: blur(3px);
|
-webkit-backdrop-filter: blur(3px);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
border: 1px solid var(--glass-border);
|
||||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
|
box-shadow: var(--glass-shadow);
|
||||||
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
||||||
inset 0 -1px 0 rgba(255, 255, 255, 0.05),
|
|
||||||
inset 0 0 8px 4px rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.glassBorder{
|
.glassBorder{
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 28px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.modifyIcon {
|
.modifyIcon {
|
||||||
height: 26px;
|
height: 26px;
|
||||||
width: 26px;
|
width: 26px;
|
||||||
@@ -22,9 +22,6 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
border-radius: 12px;
|
|
||||||
background: var(--glass-bg, rgba(255, 255, 255, 0.25));
|
|
||||||
backdrop-filter: blur(6px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.section h3 {
|
.section h3 {
|
||||||
@@ -43,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.submitBtn {
|
.submitBtn {
|
||||||
width: 100%;
|
align-self: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
@@ -65,14 +62,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
padding: 22px;
|
|
||||||
gap: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.submitBtn {
|
.submitBtn {
|
||||||
width: auto;
|
width: auto;
|
||||||
align-self: center;
|
|
||||||
min-width: 220px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.section button {
|
.section button {
|
||||||
@@ -87,8 +80,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
padding: 26px;
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modifyIcon {
|
.modifyIcon {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default function SettingsModal() {
|
|||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
>
|
>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<div className={styles.section}>
|
<div className={`glassBorder ${styles.section}`}>
|
||||||
<h3>Compte</h3>
|
<h3>Compte</h3>
|
||||||
|
|
||||||
<Button variant="danger" onClick={handleLogout}>
|
<Button variant="danger" onClick={handleLogout}>
|
||||||
@@ -101,8 +101,7 @@ export default function SettingsModal() {
|
|||||||
>
|
>
|
||||||
Supprimer le compte
|
Supprimer le compte
|
||||||
</Button>
|
</Button>
|
||||||
|
<div className={styles.test}>
|
||||||
<div className={styles.section}>
|
|
||||||
<h4>Changer de Prénom</h4>
|
<h4>Changer de Prénom</h4>
|
||||||
<TextInput
|
<TextInput
|
||||||
value={name}
|
value={name}
|
||||||
@@ -111,8 +110,8 @@ export default function SettingsModal() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.section}>
|
<div className={styles.test}>
|
||||||
<h4>Changer de nom</h4>
|
<h4>Changer de nom</h4>
|
||||||
<TextInput
|
<TextInput
|
||||||
value={lastname}
|
value={lastname}
|
||||||
onChange={handleLastnameChange}
|
onChange={handleLastnameChange}
|
||||||
@@ -120,8 +119,8 @@ export default function SettingsModal() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.section}>
|
<div className={styles.test}>
|
||||||
<h4>Changer de numéro de téléphone</h4>
|
<h4>Changer de numéro de téléphone</h4>
|
||||||
<TextInput
|
<TextInput
|
||||||
value={phone}
|
value={phone}
|
||||||
onChange={handlePhoneChange}
|
onChange={handlePhoneChange}
|
||||||
@@ -137,7 +136,7 @@ export default function SettingsModal() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.section}>
|
<div className={`glassBorder ${styles.section}`}>
|
||||||
<h3>Apparence</h3>
|
<h3>Apparence</h3>
|
||||||
<ThemeSwitcher/>
|
<ThemeSwitcher/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user