Skip to content

Commit

Permalink
update typings to 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
katzoo committed Dec 19, 2016
1 parent d765913 commit b5e0c62
Show file tree
Hide file tree
Showing 29 changed files with 853 additions and 311 deletions.
17 changes: 13 additions & 4 deletions components/app_bar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface AppBarTheme {
/**
* Used as the app bar title.
*/
title ?: string;
title?: string;
/**
* Added to the left icon app bar element.
*/
Expand All @@ -26,9 +26,13 @@ export interface AppBarTheme {
* Added to the right icon app bar element.
*/
rightIcon?: string;
/**
* Added to the root element when the app bar is hidden during scroll.
*/
scrollHide?: string;
}

interface AppBarProps extends ReactToolbox.Props {
export interface AppBarProps extends ReactToolbox.Props {
/**
* Children to pass through the component.
*/
Expand All @@ -50,19 +54,24 @@ interface AppBarProps extends ReactToolbox.Props {
/**
* If it exists it is used as the AppBar left icon
*/
leftIcon?: string;
leftIcon?: string | React.ReactNode;
/**
* Called when the left icon is clicked
*/
onLeftIconClick?: Function;
/**
* If it exists it is used as the AppBar right icon
*/
rightIcon?: string;
rightIcon?: string | React.ReactNode;
/**
* Called when the righticon is clicked
*/
onRightIconClick?: Function;
/**
* Whether AppBar should be hidden during scroll.
* @default false
*/
scrollHide?: boolean;
/**
* Classnames object defining the component style.
*/
Expand Down
35 changes: 27 additions & 8 deletions components/autocomplete/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from "react";
import ReactToolbox from "../index";
import { InputTheme } from "../input"

export interface AutocompleteTheme {
/**
Expand All @@ -18,10 +19,6 @@ export interface AutocompleteTheme {
* Used to style the Input component.
*/
input?: string;
/**
* Used for the label.
*/
label?: string;
/**
* Used to style each suggestion.
*/
Expand All @@ -44,37 +41,55 @@ export interface AutocompleteTheme {
values?: string;
}

interface AutocompleteProps extends ReactToolbox.Props {
export interface AutocompleteProps extends ReactToolbox.Props {
/**
* Determines if user can create a new option with the current typed value.
* @default false
*/
allowCreate?: boolean;
/**
* Determines the opening direction. It can be auto, up or down.
* @default auto
*/
direction?: "auto" | "up" | "down";
/**
* If true, component will be disabled.
* @default false
*/
disabled?: boolean;
/**
* Sets the error string for the internal input element.
* @default false
*/
error?: string | React.ReactNode;
/**
* Whether component should keep focus after value change.
* @default false
*/
keepFocusOnChange?: boolean;
/**
* The text string to use for the floating label element.
*/
label?: string | React.ReactNode;
/**
* If true, component can hold multiple values.
* @default true
*/
multiple?: boolean;
/**
* Callback function that is fired when component is blurred.
*/
onBlur?: Function;
/**
* Callback function that is fired when the components's value changes.
* @default auto
*/
onChange?: Function;
/**
* Callback function that is fired when component is focused.
*/
onFocus?: Function;
/**
* Callback function that is fired when the components's query value changes.
* @default auto
*/
onQueryChange?: Function;
/**
Expand Down Expand Up @@ -104,11 +119,15 @@ interface AutocompleteProps extends ReactToolbox.Props {
/**
* Classnames object defining the component style.
*/
theme?: AutocompleteTheme;
theme?: AutocompleteTheme & InputTheme;
/**
* Value or array of values currently selected component.
*/
value?: any;
/**
* Additional properties passed to inner Input component.
*/
[key: string]: any;
}

export class Autocomplete extends React.Component<AutocompleteProps, {}> { }
Expand Down
7 changes: 6 additions & 1 deletion components/avatar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ export interface AvatarTheme {
letter?: string;
}

interface AvatarProps extends ReactToolbox.Props {
export interface AvatarProps extends ReactToolbox.Props {
/**
* Children to pass through the component.
*/
children?: React.ReactNode;
/**
* Set to true if your image is not squared so it will be used as a cover for the element.
* @default false
*/
cover?: boolean;
/**
Expand All @@ -41,6 +42,10 @@ interface AvatarProps extends ReactToolbox.Props {
* A title for the image. If no image is provided, the first letter will be displayed as the avatar.
*/
title?: string;
/**
* Additional properties for component root element.
*/
[key: string]: any;
}

export class Avatar extends React.Component<AvatarProps, {}> { }
Expand Down
Loading

0 comments on commit b5e0c62

Please sign in to comment.