mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +00:00
feat: delete client setup component and story
This commit is contained in:
parent
2c3e4faa3e
commit
55250fa278
@ -1,29 +0,0 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
import { withRouter } from 'storybook-addon-react-router-v6'
|
||||
|
||||
import SetupRow from './SetupRow'
|
||||
|
||||
const meta = {
|
||||
title: 'ValidatorOnboarding/SetupRow',
|
||||
component: SetupRow,
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
decorators: [withRouter],
|
||||
} satisfies Meta<typeof SetupRow>
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
title: 'Setup up Validators',
|
||||
},
|
||||
}
|
||||
|
||||
export const WithoutTitle: Story = {
|
||||
args: {
|
||||
title: '',
|
||||
},
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
import { YStack } from 'tamagui'
|
||||
import { Text } from '@status-im/components'
|
||||
import { useState } from 'react'
|
||||
|
||||
import ValidatorsMenuWithPrice from '../../../components/General/ValidatorsMenuWithPrice'
|
||||
|
||||
type SetupRowProps = {
|
||||
title: string
|
||||
}
|
||||
|
||||
const SetupRow = ({ title }: SetupRowProps) => {
|
||||
const [validatorCount, setValidatorCount] = useState(0)
|
||||
|
||||
const changeValidatorCountHandler = (value: string) => {
|
||||
const numberValue = Number(value)
|
||||
if (!isNaN(numberValue)) {
|
||||
setValidatorCount(numberValue)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<YStack space={'$4'}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
{title}
|
||||
</Text>
|
||||
<ValidatorsMenuWithPrice
|
||||
validatorCount={validatorCount}
|
||||
changeValidatorCountHandler={changeValidatorCountHandler}
|
||||
label="How many Validators would you like to run?"
|
||||
/>
|
||||
</YStack>
|
||||
)
|
||||
}
|
||||
export default SetupRow
|
Loading…
x
Reference in New Issue
Block a user