@stakefish/ui
Version:
<div align="center"> <a href="https://www.npmjs.com/package/@stakefish/ui"><img src="https://gateway.pinata.cloud/ipfs/QmbZL1ceA8Yiz2pKALTg919jYx141DPUGegC9L4XpyayW5" width="300" /></a> </div>
54 lines (53 loc) • 1.59 kB
TypeScript
import React from "react";
import { InputProps } from "./Input";
import { TextFieldProps } from "./TextField";
import { IconButtonProps } from "./IconButton";
/**
* Types
*/
interface StepperProps {
/**
* The color of the `Input` element. The prop defaults to the value (`'primary'`)
* `Stepper`'s color will be mapped on the `inputColor` value.
*/
inputColor?: InputProps["color"];
/**
* The size of the `Input` element. The prop defaults to the value (`'xs'`)
*/
inputSize?: Exclude<InputProps["size"], undefined>;
/**
* The input element bound to the `Stepper`.
*/
inputNode?: HTMLInputElement | null;
/**
* The value of the pressed key.
*/
keyPress?: React.KeyboardEvent<HTMLDivElement>["key"] | null;
/**
* If `true`, the component is disabled. The prop defaults to the value (`false`).
*/
disabled?: boolean;
/**
* Props passing to the upward `IconButton` element in the `Stepper`.
*/
upButtonProps?: Partial<IconButtonProps>;
/**
* Props passing to the downward `IconButton` element in the `Stepper`.
*/
downButtonProps?: Partial<IconButtonProps>;
}
export interface NumericFieldProps extends Omit<TextFieldProps, "type"> {
/**
* Props passing to the `Stepper` element.
*/
stepperProps?: StepperProps;
}
/**
* Components
*/
export declare const Stepper: React.FC<StepperProps>;
/**
* Main
*/
declare const NumericField: React.FC<NumericFieldProps>;
export default NumericField;