From 6530eaa2b6631059d76ffc3348fdd880a9c16466 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Fri, 24 Jan 2025 10:33:54 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20cr=C3=A9ation=20d'une=20molecule=20`Ale?= =?UTF-8?q?rt`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 4 types : warning, error, info et success - avec ou sans icone - message personnalisable Au passage, simplifie la molecule `Loading`. Configure la taille de l'icone par rapport à la taille du texte. Supprime la notion de `inline` et le padding autour du composant. --- front/src/components/Export.jsx | 8 +-- front/src/components/Loading.jsx | 22 ------- front/src/components/Write/PreviewPaged.jsx | 2 +- front/src/components/Write/Write.jsx | 2 +- front/src/components/corpus/Corpus.jsx | 2 +- front/src/components/molecules/Alert.jsx | 57 +++++++++++++++++++ .../components/molecules/Alert.module.scss | 28 +++++++++ front/src/components/molecules/Loading.jsx | 33 +++++++++++ .../Loading.module.scss} | 20 +++---- front/src/stories/Story.jsx | 19 ++++++- 10 files changed, 150 insertions(+), 43 deletions(-) delete mode 100644 front/src/components/Loading.jsx create mode 100644 front/src/components/molecules/Alert.jsx create mode 100644 front/src/components/molecules/Alert.module.scss create mode 100644 front/src/components/molecules/Loading.jsx rename front/src/components/{loading.module.scss => molecules/Loading.module.scss} (60%) diff --git a/front/src/components/Export.jsx b/front/src/components/Export.jsx index 922f32096..10271bb35 100644 --- a/front/src/components/Export.jsx +++ b/front/src/components/Export.jsx @@ -8,7 +8,7 @@ import { applicationConfig } from '../config.js' import Select from './Select' import Combobox from './SelectCombobox.jsx' -import Loading from './Loading' +import Loading from './molecules/Loading.jsx' import styles from './export.module.scss' import buttonStyles from './button.module.scss' import formStyles from './form.module.scss' @@ -86,7 +86,7 @@ export default function Export(props) { return (
- {!exportFormats.length && } + {!exportFormats.length && } {exportFormats.length && (