Skip to content

Commit

Permalink
Updated: Number Input documentation updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Feb 27, 2024
1 parent 1245249 commit ac4bd0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 62 deletions.
17 changes: 6 additions & 11 deletions app/docs/components/numberInput/NumberInput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,32 @@ import { DefaultNumberInput, DefaultNumberInputCode } from './variant/DefaultNum
import { NumberInputWithLabel, NumberInputWithLabelCode } from './variant/NumberInputWithLabel'
import { NumberInputWithState, NumberInputWithStateCode } from './variant/NumberInputWithState'
import { numberInputApiData } from './NumberInputApi'

import CodePreview from '../../../components/CodePreview'

import ComponentApi from '../../../components/ComponentApi'

## Table of Contents

Number Input Component is a user interface element designed for collecting numeric input from users. It provides a field where users can enter numerical values, such as integers or decimals, using keyboard input or arrow buttons.
The Number Input Component is a user interface element designed for collecting numeric input from users. It provides a field where users can enter numerical values, such as integers or decimals, using keyboard input or arrow buttons.

## Default Number Input

Default Number Input a simple numeric input field with two buttons for incrementing and decrementing the value.
Default Number Input is a simple numeric input field with two buttons for incrementing and decrementing the value.

<CodePreview github="NumberInput" code={DefaultNumberInputCode}>
<DefaultNumberInput />
</CodePreview>

## Number Input With Label

You can show a label and helper text to assist the user.

<CodePreview github="NumberInput" code={NumberInputWithLabelCode}>
<NumberInputWithLabel />
</CodePreview>

## Number Input With State

You can manage the input state with React state.

<CodePreview github="NumberInput" code={NumberInputWithStateCode}>
<NumberInputWithState />
</CodePreview>

## API Reference

Explore the available props for the number input component

<ComponentApi data={numberInputApiData} />
52 changes: 1 addition & 51 deletions app/docs/components/numberInput/NumberInputApi.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
export const numberInputApiData = [
{
id: 1,
propsName: 'value',
propsType: 'number',
propsDescription: 'The current value of the NumberInput.',
default: '100',
},
{
id: 2,
propsName: 'sizing',
propsType: ['sm', 'md', 'lg'],
propsDescription: 'Size of the NumberInput component.',
default: 'md',
},
{
id: 3,
propsName: 'disabled',
propsType: 'boolean',
propsDescription: 'Indicates whether the NumberInput is disabled.',
default: 'false',
},
{
id: 4,
propsName: 'helperText',
propsType: 'ReactNode',
propsDescription: 'Additional helper text to assist the user.',
default: 'null',
},
{
id: 5,
propsName: 'icon',
propsType: 'ReactNode',
propsDescription: 'An optional icon to display within the NumberInput component.',
default: 'None',
},
{
id: 6,
propsName: 'iconPosition',
propsType: ['right', 'left'],
propsDescription: 'Position of the icon within the NumberInput.',
default: 'None',
},
{
id: 7,
propsName: 'setValue',
propsType: 'Function',
propsDescription: 'Function to update the value of the NumberInput.',
default: 'Function',
},
]
export const numberInputApiData = []

0 comments on commit ac4bd0c

Please sign in to comment.