diff --git a/source/components/SimulateurWarning.css b/source/components/SimulateurWarning.css deleted file mode 100644 index 8703643e2..000000000 --- a/source/components/SimulateurWarning.css +++ /dev/null @@ -1,20 +0,0 @@ -.beta__container { - padding-left: 1rem; - border-top-left-radius: 0.3rem; - margin-top: 1rem; - border-left: 3px solid #333; -} -.beta__tag { - font-size: 80%; - line-height: 1rem; - padding: 0.4rem 0.8rem; - background: #333; - margin-left: -1rem; - text-transform: uppercase; - color: white; - border-bottom-right-radius: 0.3rem; - border-top-right-radius: 0.3rem; - display: inline-block; - margin-bottom: 0.6rem; - vertical-align: middle; -} diff --git a/source/components/SimulateurWarning.js b/source/components/SimulateurWarning.js index d6154e4c5..41f86d47a 100644 --- a/source/components/SimulateurWarning.js +++ b/source/components/SimulateurWarning.js @@ -1,35 +1,50 @@ import { T } from 'Components' -import React from 'react' +import React, { useState } from 'react' import emoji from 'react-easy-emoji' -import './SimulateurWarning.css' -export default function SimulateurWarning({ simulateur }) { +export default function SimulateurWarning({ simulateur, autoFolded }) { + let [userFolded, userFold] = useState(undefined) + + let folded = userFolded === undefined ? autoFolded : userFolded, + toggle = () => userFold(!userFolded) + return ( -
+

{emoji('🚩 ')} - Ce simulateur est en cours de développement + Outil en cours de développement + {folded && (plus d'info)}

- + + {!folded && ( +
+ J'ai compris +
+ )} +
) } diff --git a/source/components/Simulation.js b/source/components/Simulation.js index 806de10cd..860ca6bc5 100644 --- a/source/components/Simulation.js +++ b/source/components/Simulation.js @@ -61,9 +61,10 @@ export default compose( {this.state.displayAnswers && ( this.setState({ displayAnswers: false })} /> )} -
+
{arePreviousAnswers ? (