Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

698 replace shared wallet illustrations #707

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;