gadgets
Version:
Reusable React UI widgets - This is my widget library. There are many like it, but this one is mine...
65 lines (64 loc) • 1.83 kB
TypeScript
/**
* A wrapper for the li component. An item can have three parts:
*
* - Title block
* - Title String
* - Optional Widget
* - Left Button
* - Right Button
*
* This serves as a reusable component for List, Accordion, and DynamicList
*
* ## Screen:
* See the List, Accordion, or DynamicList
*
* ## Examples:
*
* ```javascript
*
*
* ```
*
* ## API
* #### Events
* -
*
* #### Styles
* - `ui-item` - A global style placed on the `<li>` element.
*
* #### Properties
* - `hiddenLeftButton=false {boolean}` - The state of the left button is set
* to hidden and shown when hovering over the `li`.
*
* @module Item
*
*/
import * as React from "react";
import { BaseComponent, BaseProps, BaseState } from "../shared";
import { TitleLayout, TitleProps } from "../title/Title";
export interface ItemProps extends BaseProps, TitleProps {
hiddenLeftButton?: boolean;
hiddenRightButton?: boolean;
leftButton?: any;
layout?: TitleLayout;
onBlur?: (e: React.FocusEvent<HTMLLIElement>) => void;
onChange?: (...args: any[]) => void;
onClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
onDoubleClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
onFocus?: (e: React.FocusEvent<HTMLLIElement>) => void;
onKeyDown?: (e: React.KeyboardEvent<HTMLLIElement>) => void;
onKeyPress?: (e: React.KeyboardEvent<HTMLLIElement>) => void;
onMouseOut?: (e: React.MouseEvent<HTMLLIElement>) => void;
onUpdate?: (...args: any[]) => void;
rightButton?: any;
stacked?: boolean;
title?: string;
useedit?: boolean;
}
export declare type ItemState = BaseState;
export declare class Item extends BaseComponent<ItemProps, ItemState> {
static readonly defaultProps: ItemProps;
constructor(props: ItemProps);
render(): JSX.Element;
}
export default Item;