Skip to content

Commit

Permalink
Onboarding: show back button during configuration on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
sohkai committed Sep 10, 2019
1 parent e2cc15a commit 564b542
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions src/templates/kit/PrevNextFooter.js
@@ -1,5 +1,5 @@
import React, { useRef, useImperativeHandle } from 'react'
import { Button, IconArrowLeft, useTheme, useViewport } from '@aragon/ui'
import { Button, IconArrowLeft, GU, useTheme } from '@aragon/ui'

const PrevNextFooter = React.forwardRef(function PrevNextFooter(
{
Expand All @@ -13,7 +13,6 @@ const PrevNextFooter = React.forwardRef(function PrevNextFooter(
ref
) {
const theme = useTheme()
const { above } = useViewport()

const nextRef = useRef()

Expand All @@ -37,28 +36,28 @@ const PrevNextFooter = React.forwardRef(function PrevNextFooter(
justify-content: space-between;
`}
>
{above('medium') && (
<Button
disabled={!backEnabled}
icon={
<IconArrowLeft
css={`
color: ${theme.accent};
`}
/>
}
label={backLabel}
onClick={onBack}
/>
)}
<Button
disabled={!backEnabled}
icon={
<IconArrowLeft
css={`
color: ${theme.accent};
`}
/>
}
label={backLabel}
onClick={onBack}
/>
<Button
ref={nextRef}
disabled={!nextEnabled}
label={nextLabel}
mode="strong"
onClick={onNext}
wide={!above('medium')}
type="submit"
css={`
margin-left: ${1.5 * GU}px;
`}
/>
</div>
)
Expand Down

0 comments on commit 564b542

Please sign in to comment.