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

View File

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