-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from mission-apprentissage/ui/rework-question…
…naire UI/rework questionnaire
- Loading branch information
Showing
41 changed files
with
1,712 additions
and
1,162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Box, Text, useBreakpoint } from "@chakra-ui/react"; | ||
import parse from "html-react-parser"; | ||
|
||
const DidYouKnow = ({ content }) => { | ||
const breakpoint = useBreakpoint({ ssr: false }); | ||
const isMobile = breakpoint === "base"; | ||
if (!content) return null; | ||
|
||
return ( | ||
<Box | ||
bgColor="brand.blue.100" | ||
width="calc(100% + 48px)" | ||
ml="-24px" | ||
display="flex" | ||
p="4" | ||
mb="4" | ||
alignItems="center" | ||
justifyContent={isMobile ? "center" : "initial"} | ||
> | ||
<Box | ||
bgColor="brand.blue.700" | ||
borderRadius="100%" | ||
width="40px" | ||
height="40px" | ||
display="flex" | ||
justifyContent="center" | ||
alignItems="center" | ||
w="40px" | ||
> | ||
<Text fontSize="2xl">💡</Text> | ||
</Box> | ||
<Box ml="2" w="calc(100% - 40px)"> | ||
<Text color="brand.blue.700" fontWeight="semibold"> | ||
Le savais-tu ? | ||
</Text> | ||
<Text color="brand.blue.700">{parse(content)}</Text> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default DidYouKnow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.