Skip to content

Commit

Permalink
feat(typings): Add declarations for Dimmer (#1092)
Browse files Browse the repository at this point in the history
feat(typings): Add declarations for Dimmer
  • Loading branch information
wcatron authored and levithomason committed Dec 30, 2016
1 parent 9b661ac commit cbc7b00
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2473,6 +2473,81 @@ interface CheckboxProps {
export class Checkbox extends React.Component<CheckboxProps, {}> {
}

// Dimmer
// ----------------------------------
interface DimmerProps {

/** An active dimmer will dim its parent container. */
active?: boolean;

/** An element type to render as (string or function). */
as?: any;

/** Primary content. */
children?: React.ReactNode;

/** Additional classes. */
className?: string;

/** Shorthand for primary content. */
content?: any;

/** A disabled dimmer cannot be activated */
disabled?: boolean;

/**
* Called when the dimmer is clicked.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onClick?: React.MouseEventHandler<HTMLDivElement>;

/**
* Handles click outside Dimmer's content, but inside Dimmer area.
*
* @param {SyntheticEvent} event - React's original SyntheticEvent.
* @param {object} data - All props.
*/
onClickOutside?: React.MouseEventHandler<HTMLDivElement>;

/** A dimmer can be formatted to have its colors inverted. */
inverted?: boolean;

/** A dimmer can be formatted to be fixed to the page. */
page?: boolean;

/** A dimmer can be controlled with simple prop. */
simple?: boolean;

}

interface DimmerClass extends React.ComponentClass<DimmerProps> {
Dimmable: typeof DimmerDimmable;
}

export const Dimmer: DimmerClass;

interface DimmerDimmableProps {

/** An element type to render as (string or function). */
as?: any;

/** A dimmable element can blur its contents. */
blurring?: boolean;

/** Primary content. */
children?: React.ReactNode;

/** Additional classes. */
className?: string;

/** Controls whether or not the dim is displayed. */
dimmed?: boolean;
}

export const DimmerDimmable: React.ComponentClass<DimmerDimmableProps>;

// Dropdown
// ----------------------------------
type DropdownPropPointing = 'left' | 'right' | 'top' | 'top left' | 'top right' | 'bottom' | 'bottom left' | 'bottom right'
Expand Down

0 comments on commit cbc7b00

Please sign in to comment.