mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-21 00:40:09 +00:00
feat(validator onboarding): style back button
This commit is contained in:
parent
d6daf9d84f
commit
f542722604
@ -9,16 +9,40 @@ type BackButtonProps = {
|
||||
const BackButton = ({ prevPage }: BackButtonProps) => {
|
||||
const [buttonState, setButtonState] = useState('enabled')
|
||||
|
||||
const buttonStyle = {
|
||||
color:
|
||||
buttonState === 'enabled'
|
||||
? '09101C'
|
||||
: buttonState == 'disabled'
|
||||
? 'CED4DB'
|
||||
: 'fff',
|
||||
fill: buttonState === 'pressed' ? '2A4AF5' : '',
|
||||
textColor: buttonState === 'disabled' ? 'CED4DB' : '09101C',
|
||||
}
|
||||
return (
|
||||
<XStack
|
||||
alignItems="center"
|
||||
space="$3"
|
||||
cursor={buttonState === 'pressed' ? 'pointer' : ''}
|
||||
onClick={() => console.log('gosho')}
|
||||
onMouseEnter={() => setButtonState('pressed')}
|
||||
onMouseLeave={() => setButtonState('enabled')}
|
||||
>
|
||||
<Stack
|
||||
style={{
|
||||
border: `1px solid #${buttonStyle.color}`,
|
||||
borderRadius: '8px',
|
||||
padding: '10px',
|
||||
backgroundColor: `#${buttonStyle.fill}`,
|
||||
background: `#${buttonStyle.fill}`,
|
||||
}}
|
||||
>
|
||||
<ArrowLeftIcon
|
||||
size={16}
|
||||
color={`#${buttonStyle.color}`}
|
||||
></ArrowLeftIcon>
|
||||
</Stack>
|
||||
<Text size={15} color={`#${buttonStyle.textColor}`} weight={'regular'}>
|
||||
{prevPage}
|
||||
</Text>
|
||||
</XStack>
|
||||
|
Loading…
x
Reference in New Issue
Block a user