carbon-custom-elements
Version:
A Carbon Design System variant that's as easy to use as native HTML elements, with no framework tax, no framework silo.
81 lines (68 loc) • 1.69 kB
TypeScript
/**
* @license
*
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Component } from 'react';
interface ComponentProps {
/**
* The color scheme.
*/
colorScheme?: string;
/**
* The minimum value allowed in the input
*/
min?: string;
/**
* The maximum value allowed in the input
*/
max?: string;
/**
* The amount the value should increase or decrease by
*/
step?: string;
/**
* The value of the input.
*/
value?: string;
/**
* Set to `true` to enable the mobile variant of the number input
*/
mobile?: boolean;
/**
* Aria text for the button that increments the value
*/
incrementButtonAssistiveText?: string;
/**
* Aria text for the button that decrements the value
*/
decrementButtonAssistiveText?: string;
/**
* The input box size.
*/
size?: string;
/**
* The validity message shown when the value is greater than the maximum
*
* Also available via the `validity-message-max` slot
*/
validityMessageMax?: string;
/**
* The validity message shown when the value is less than the minimum
*
* Also available via the `validity-message-min` slot
*/
validityMessageMin?: string;
}
/**
* Number input.
* @element bx-number-input
* @slot helper-text - The helper text.
* @slot label-text - The label text.
* @slot validity-message - The validity message. If present and non-empty, this input shows the UI of its invalid state.
*/
declare class BXNumberInput extends Component<ComponentProps> {}
export default BXNumberInput;