Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typings): Add declarations for Dimmer #1092

Merged
merged 1 commit into from
Dec 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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