From 9872dd745d9d6522ccb54a6eb02c1ffd92b63fff Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 1 Mar 2019 17:00:19 +0100 Subject: [PATCH] :art: L'avertissement se replie Pour mobile --- source/components/SimulateurWarning.css | 20 ------- source/components/SimulateurWarning.js | 60 ++++++++++++------- source/components/Simulation.js | 3 +- .../simulationConfigs/withSimulationConfig.js | 14 +++-- .../pages/SocialSecurity/AutoEntrepreneur.js | 4 +- 5 files changed, 51 insertions(+), 50 deletions(-) diff --git a/source/components/SimulateurWarning.css b/source/components/SimulateurWarning.css index 8703643e2..e69de29bb 100644 --- a/source/components/SimulateurWarning.css +++ b/source/components/SimulateurWarning.css @@ -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..8ab60330f 100644 --- a/source/components/SimulateurWarning.js +++ b/source/components/SimulateurWarning.js @@ -1,35 +1,51 @@ 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 ? (