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

Fix: back button style #3742

Merged
merged 3 commits into from
May 29, 2024
Merged
Changes from 2 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
5 changes: 3 additions & 2 deletions src/components/tx-flow/common/TxLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import useSafeInfo from '@/hooks/useSafeInfo'
import { type ComponentType, type ReactElement, type ReactNode, useContext, useEffect, useState } from 'react'
import { Box, Container, Grid, Typography, Button, Paper, SvgIcon, IconButton, useMediaQuery } from '@mui/material'
import ArrowBackIcon from '@mui/icons-material/ArrowBack'
import { useTheme } from '@mui/material/styles'
import type { TransactionSummary } from '@safe-global/safe-gateway-typescript-sdk'
import classnames from 'classnames'
Expand Down Expand Up @@ -82,7 +83,6 @@ const TxLayout = ({

const theme = useTheme()
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'))
const isDesktop = useMediaQuery(theme.breakpoints.down('lg'))

const steps = Array.isArray(children) ? children : [children]
const progress = Math.round(((step + 1) / steps.length) * 100)
Expand Down Expand Up @@ -146,9 +146,10 @@ const TxLayout = ({
{onBack && step > 0 && (
<Button
data-testid="modal-back-btn"
variant={isDesktop ? 'text' : 'contained'}
variant="outlined"
onClick={onBack}
className={css.backButton}
startIcon={<ArrowBackIcon fontSize="small" />}
>
Back
</Button>
Expand Down
Loading