semantic-ui-calendar-react
Version:
date/time picker built from semantic-ui elements
54 lines (53 loc) • 2.11 kB
TypeScript
import * as React from 'react';
interface InputViewProps {
/** Used for passing input dom node (input field or inline calendar) to parent component. */
onMount: (e: HTMLElement) => void;
/** Called after input field value has changed. */
onChange: (e: React.SyntheticEvent, data: any) => void;
/** Called on input focus. */
onFocus?: () => void;
/** Function for rendering component. */
render?: (props: any) => React.ReactNode;
/** Called after clear icon has clicked. */
onClear?: (e: React.SyntheticEvent, data: any) => void;
/** Picker. */
children?: React.ReactNode;
/** Whether to close a popup when cursor leaves it. */
closeOnMouseLeave?: boolean;
/** A field can have its label next to instead of above it. */
inlineLabel?: boolean;
/** Using the clearable setting will let users remove their selection from a calendar. */
clearable?: boolean;
/** Optional Icon to display inside the Input. */
icon?: any;
/** Optional Icon to display inside the clearable Input. */
clearIcon?: any;
/** Whether popup is closed. */
popupIsClosed?: boolean;
/** The node where the picker should mount. */
mountNode?: HTMLElement;
/** Input element tabindex. */
tabIndex?: string | number;
/** Whether to display inline picker or picker inside a popup. */
inline?: boolean;
/** Where to display popup. */
popupPosition?: 'top left' | 'top right' | 'bottom right' | 'bottom left' | 'right center' | 'left center' | 'top center' | 'bottom center';
/** Currently selected value. */
value?: string;
}
declare class InputView extends React.Component<InputViewProps, any> {
static defaultProps: {
inline: boolean;
closeOnMouseLeave: boolean;
tabIndex: string;
clearable: boolean;
icon: string;
clearIcon: string;
};
private initialInputNode;
private inputNode;
componentDidMount(): void;
componentDidUpdate(): void;
render(): {};
}
export default InputView;