feat: make advanced settings optional

This commit is contained in:
RadoslavDimchev 2023-08-11 14:38:26 +03:00
parent abda7859c0
commit f9f39c6a17
2 changed files with 8 additions and 4 deletions

View File

@ -7,16 +7,19 @@ import Icon from './Icon'
type TitlesProps = {
title: string
subtitle: string
isAdvancedSettings?: boolean
}
const Titles = ({ title, subtitle }: TitlesProps) => {
const Titles = ({ title, subtitle, isAdvancedSettings }: TitlesProps) => {
return (
<YStack style={{ width: '100%' }}>
<XStack style={{ justifyContent: 'space-between', alignItems: 'center' }}>
<Title color={'#09101C'}>{title}</Title>
<Button variant="outline" size={32} icon={<Icon src={'/icons/reveal.png'} />}>
Advanced Settings
</Button>
{isAdvancedSettings && (
<Button size={32} variant="outline" icon={<Icon src={'/icons/reveal.png'} />}>
Advanced Settings
</Button>
)}
</XStack>
<SubTitle color={'#09101C'}>{subtitle}</SubTitle>
</YStack>

View File

@ -35,6 +35,7 @@ const DeviceHeanlthCheckContent = () => {
<Titles
title="Device Health Check"
subtitle="Configure your device to start Staking on Nimbus"
isAdvancedSettings={true}
/>
<XStack space={'$4'}>
<DeviceStorageHealth storage={1} maxStorage={2} />