nuke inputnumber
This commit is contained in:
parent
0d53346d61
commit
c93faf628b
@ -42,7 +42,6 @@ export {
|
||||
InputGroup,
|
||||
InputLabelWrapper,
|
||||
InputMultiSelect,
|
||||
InputNumber,
|
||||
InputText,
|
||||
Label,
|
||||
LayoutSelector,
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { Input, InputLabelWrapper } from '@ohif/ui';
|
||||
|
||||
const InputNumber = ({
|
||||
label,
|
||||
isSortable,
|
||||
sortDirection,
|
||||
onLabelClick,
|
||||
value,
|
||||
onChange,
|
||||
}) => {
|
||||
return (
|
||||
<InputLabelWrapper
|
||||
label={label}
|
||||
isSortable={isSortable}
|
||||
sortDirection={sortDirection}
|
||||
onLabelClick={onLabelClick}
|
||||
>
|
||||
<Input
|
||||
className="border-primary-main mt-2 bg-black"
|
||||
type="number"
|
||||
containerClassName="mr-2"
|
||||
value={value}
|
||||
onChange={event => {
|
||||
onChange(event.target.value);
|
||||
}}
|
||||
/>
|
||||
</InputLabelWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
InputNumber.defaultProps = {
|
||||
value: '',
|
||||
isSortable: false,
|
||||
onLabelClick: () => {},
|
||||
sortDirection: 'none',
|
||||
};
|
||||
|
||||
InputNumber.propTypes = {
|
||||
label: PropTypes.string.isRequired,
|
||||
isSortable: PropTypes.bool,
|
||||
sortDirection: PropTypes.oneOf(['ascending', 'descending', 'none']),
|
||||
onLabelClick: PropTypes.func,
|
||||
value: PropTypes.number,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default InputNumber;
|
||||
@ -1,44 +0,0 @@
|
||||
---
|
||||
name: InputNumber
|
||||
menu: Form
|
||||
route: components/InputNumber
|
||||
---
|
||||
|
||||
import { useState } from 'react';
|
||||
import { Playground, Props } from 'docz';
|
||||
import { InputNumber } from '@ohif/ui';
|
||||
|
||||
# Input Text
|
||||
|
||||
## Import
|
||||
|
||||
```javascript
|
||||
import { InputNumber } from '@ohif/ui';
|
||||
```
|
||||
|
||||
## Basic usage
|
||||
|
||||
<Playground>
|
||||
{() => {
|
||||
const [number, setNumber] = useState(10);
|
||||
return (
|
||||
<div className="flex flex-col flex-1 p-4 items-center">
|
||||
<div className="w-56">
|
||||
<InputNumber
|
||||
min={1}
|
||||
max={100}
|
||||
label="Number"
|
||||
value={number}
|
||||
onChange={value => {
|
||||
setText(value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</Playground>
|
||||
|
||||
## Properties
|
||||
|
||||
<Props of={InputNumber} />
|
||||
@ -1,2 +0,0 @@
|
||||
import InputNumber from './InputNumber';
|
||||
export default InputNumber;
|
||||
@ -11,7 +11,6 @@ import InputDateRange from './InputDateRange';
|
||||
import InputGroup from './InputGroup';
|
||||
import InputLabelWrapper from './InputLabelWrapper';
|
||||
import InputMultiSelect from './InputMultiSelect';
|
||||
import InputNumber from './InputNumber';
|
||||
import InputText from './InputText';
|
||||
import Label from './Label';
|
||||
import LayoutSelector from './LayoutSelector';
|
||||
@ -67,7 +66,6 @@ export {
|
||||
InputGroup,
|
||||
InputLabelWrapper,
|
||||
InputMultiSelect,
|
||||
InputNumber,
|
||||
InputText,
|
||||
Label,
|
||||
LayoutSelector,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user