Skip to content

Commit

Permalink
698 replace shared wallet illustrations (#707)
Browse files Browse the repository at this point in the history
* Change Illustrations on tutorial for shared wallet

* Update icons, colors, margins
  • Loading branch information
mikozet committed Aug 8, 2023
1 parent 6189b72 commit be0fa98
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 23 deletions.
50 changes: 49 additions & 1 deletion assets/images/org-tutorial-step-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
230 changes: 229 additions & 1 deletion assets/images/org-tutorial-step-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 69 additions & 1 deletion assets/images/org-tutorial-step-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 12 additions & 20 deletions src/components/TutorialOrganization.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Box, Dialog, IconButton, Slide, Typography } from '@mui/material';
import useMediaQuery from '@mui/material/useMediaQuery';
import makeStyles from '@mui/styles/makeStyles';
import PropTypes from 'prop-types';
import React, { useState } from 'react';
Expand Down Expand Up @@ -44,18 +43,21 @@ const useStyles = makeStyles((theme) => ({
},
},
},
btnContainer: {
'& svg': {
color: theme.custom.colors.violet,
},
},
slideContainer: {
height: '100%',
},
imageContainer: {
height: 230,
[theme.breakpoints.up('sm')]: {
height: 320,
},
height: 235,
},
slideBody: {
maxWidth: 480,
maxWidth: 410,
padding: 24,
textAlign: 'center',
},
footer: {
margin: '0 auto',
Expand All @@ -69,13 +71,11 @@ const slides = [
heading: translate('TutorialOrganization.slideHeading1'),
body: translate('TutorialOrganization.slideBody1'),
image: OrgTutorialStep1SVG,
imageScale: 0.9,
},
{
heading: translate('TutorialOrganization.slideHeading2'),
body: translate('TutorialOrganization.slideBody2'),
image: OrgTutorialStep2SVG,
imageScale: 1.2,
},
{
heading: translate('TutorialOrganization.slideHeading3'),
Expand Down Expand Up @@ -132,6 +132,7 @@ const TutorialOrganization = ({ onFinishTutorial }) => {
justifyContent="space-between"
>
<Box
className={classes.btnContainer}
display="flex"
justifyContent={isFirstSlide ? 'flex-end' : 'space-between'}
padding={1}
Expand Down Expand Up @@ -159,10 +160,7 @@ const TutorialOrganization = ({ onFinishTutorial }) => {
key={slide.heading}
p={1}
>
<TutorialOrganizationImage
image={slide.image}
imageScale={slide.imageScale}
/>
<TutorialOrganizationImage image={slide.image} />
<Typography variant="h2">{slide.heading}</Typography>
<Typography className={classes.slideBody} variant="body1">
{slide.body}
Expand Down Expand Up @@ -194,19 +192,14 @@ const TutorialOrganization = ({ onFinishTutorial }) => {
);
};

const TutorialOrganizationImage = ({ image, imageScale }) => {
const TutorialOrganizationImage = ({ image }) => {
const classes = useStyles();
const matches = useMediaQuery((theme) => theme.breakpoints.up('sm'));

const ImageComponent = image;
const imageHeight = 180 * (imageScale || 1);
const imageHeightLarger = 250 * (imageScale || 1);

return (
<Box alignItems="center" className={classes.imageContainer} display="flex">
<ImageComponent
height={matches ? `${imageHeightLarger}px` : `${imageHeight}px`}
/>
<ImageComponent />
</Box>
);
};
Expand All @@ -217,7 +210,6 @@ TutorialOrganization.propTypes = {

TutorialOrganizationImage.propTypes = {
image: PropTypes.func.isRequired,
imageScale: PropTypes.number,
};

export default TutorialOrganization;

0 comments on commit be0fa98

Please sign in to comment.