Skip to content

Commit

Permalink
style: Update declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
myxvisual committed Aug 8, 2017
1 parent 99f2787 commit 41c6a1c
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 9 deletions.
5 changes: 4 additions & 1 deletion docs/src/components/Icons/IconComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from "react";
import * as PropTypes from "prop-types";

export interface DataProps {}
export interface DataProps {
width?: string | number;
height?: string | number;
}

export interface IconComponentsProps extends DataProps, React.HTMLAttributes<SVGElement> {}

Expand Down
2 changes: 2 additions & 0 deletions docs/src/components/Icons/IconGithub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as PropTypes from "prop-types";

export interface DataProps {
fill?: string;
width?: string | number;
height?: string | number;
}

export interface IconGithubProps extends DataProps, React.HTMLAttributes<SVGElement> {}
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/Icons/IconLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from "react";
import * as PropTypes from "prop-types";

export interface DataProps {}
export interface DataProps {
width?: string | number;
height?: string | number;
}

export interface IconLayoutProps extends DataProps, React.HTMLAttributes<SVGElement> {}

Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/Icons/IconStyle.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from "react";
import * as PropTypes from "prop-types";

export interface DataProps {}
export interface DataProps {
width?: string | number;
height?: string | number;
}

export interface IconStyleProps extends DataProps, React.HTMLAttributes<SVGElement> {}

Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/Icons/IconToolkits.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from "react";
import * as PropTypes from "prop-types";

export interface DataProps {}
export interface DataProps {
width?: string | number;
height?: string | number;
}

export interface IconToolkitsProps extends DataProps, React.HTMLAttributes<SVGElement> {}

Expand Down
2 changes: 2 additions & 0 deletions docs/src/components/ReactIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from "react";

export interface DataProps {
fill?: string;
width?: string | number;
height?: string | number;
}

export interface ReactIconProps extends DataProps, React.HTMLAttributes<SVGElement> {}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/Wrapper/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export default class Footer extends React.Component<FooterProps> {
}, {
children: "Fabric",
href: "https://dev.office.com/fabric"
}] as React.HTMLAttributes<HTMLAnchorElement>[]}
}]}
/>
<FooterLinks
style={styles.links}
title="Follow React-UWP"
links={[{
children: "Github",
href: "https://github.com/myxvisual/react-uwp"
}] as React.HTMLAttributes<HTMLAnchorElement>[]}
}]}
/>
</div>
<a
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/Wrapper/components/FooterLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import * as PropTypes from "prop-types";

export interface DataProps {
title?: string;
links?: React.HTMLAttributes<HTMLAnchorElement>[];
links?: {
children?: React.ReactNode;
href?: string
}[];
}

export interface FooterLinksProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const itemStyle: React.CSSProperties = {
};

const colors = ["Blue", "Red", "Green", "Grey", "Black", "Yellow", "Purple", "Brown", "White", "Orange", "Pink", "Violet", "Olive", "Cyan", "Magenta", "Gold", "Lavender", "Indigo", "Maroon", "Turquoise", "Chartreuse", "Coral", "Beige", "Azure", "Lime", "Teal", "Sky Blue", "Forest Green", "Silver", "Tan", "Salmon (color)", "Midnight blue", "Cornflower blue", "Fuchsia", "Ivory", "Khaki", "Steel blue", "Aquamarine", "Goldenrod", "Crimson", "Royal blue", "Slate gray", "Plum", "Spring green", "Powder blue", "Alice blue", "Orchid", "Dodger blue", "Lemon chiffon", "Light blue", "Navajo white"].map((color, index) => (
<div style={itemStyle} key={`${index}`} value={color}>
<div style={itemStyle} key={`${index}`} {...{ value: color }}>
{color}
<Icon>HeartFillLegacy</Icon>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/AutoSuggestBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface DataProps {
* Control component `background` style.
*/
background?: string;
placeholder?: string;
}

export interface AutoSuggestBoxProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
3 changes: 3 additions & 0 deletions src/CheckBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export interface DataProps {
* Set custom background to CheckBox.
*/
background?: string;
size?: string | number;
label?: string;
disabled?: boolean | string;
}

export interface CheckBoxProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
4 changes: 3 additions & 1 deletion src/HyperLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ export interface DataProps {
* `ref` to link, other attributes is applied to `HTMLAnchorElement`.
*/
ref?: string;
href?: string;
target?: string;
}

export interface HyperLinkProps extends React.HTMLAttributes<HTMLAnchorElement> {}
export interface HyperLinkProps extends DataProps, React.HTMLAttributes<HTMLAnchorElement> {}

export class HyperLink extends React.Component<HyperLinkProps> {
static contextTypes = { theme: PropTypes.object };
Expand Down
3 changes: 3 additions & 0 deletions src/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export interface DataProps {
* If you prefer `throttle` rather than `debounce`, you can set this props to `true` or provide a specific number.
*/
throttle?: boolean | number;
placeholder?: React.ReactElement<any> | React.ReactNode;
src?: string;
height?: string | number;
}

export interface ImageProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
1 change: 1 addition & 0 deletions src/PasswordBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface DataProps {
* Control PasswordBox `height` and `icon size`.
*/
passwordBoxHeight?: number;
placeholder?: string;
}

export interface PasswordBoxProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
1 change: 1 addition & 0 deletions src/Separator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as PropTypes from "prop-types";

export interface DataProps {
direction?: "row" | "column";
disabled?: boolean;
}

export interface SeparatorProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
3 changes: 3 additions & 0 deletions src/Slider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export interface DataProps {
* How many time call onChange callback.
*/
throttleTimer?: number;
width?: string | number;
height?: string | number;
label?: string;
}

export interface SliderProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}
Expand Down
3 changes: 3 additions & 0 deletions src/TextBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export interface DataProps {
/**
* Set TextBox `background`.
*/
placeholder?: string;
disabled?: string | boolean;
background?: string;
type?: string;
}

type Attributes = React.HTMLAttributes<HTMLDivElement> | React.HTMLAttributes<HTMLInputElement>;
Expand Down
1 change: 1 addition & 0 deletions src/Toggle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface DataProps {
* Set custom Toggle `background`.
*/
background?: string;
checked?: boolean;
}
export interface ToggleProps extends DataProps, React.HTMLAttributes<HTMLDivElement> {}

Expand Down

0 comments on commit 41c6a1c

Please sign in to comment.