From 41c6a1cd7bf6adc971df77bc774876c8535dc29f Mon Sep 17 00:00:00 2001 From: myxvisual Date: Tue, 8 Aug 2017 15:15:57 +0800 Subject: [PATCH] style: Update declaration --- docs/src/components/Icons/IconComponents.tsx | 5 ++++- docs/src/components/Icons/IconGithub.tsx | 2 ++ docs/src/components/Icons/IconLayout.tsx | 5 ++++- docs/src/components/Icons/IconStyle.tsx | 5 ++++- docs/src/components/Icons/IconToolkits.tsx | 5 ++++- docs/src/components/ReactIcon.tsx | 2 ++ docs/src/components/Wrapper/components/Footer.tsx | 4 ++-- docs/src/components/Wrapper/components/FooterLinks.tsx | 5 ++++- .../Components/AutoSuggestBox/ListSourceComplexExample.tsx | 2 +- src/AutoSuggestBox/index.tsx | 1 + src/CheckBox/index.tsx | 3 +++ src/HyperLink/index.tsx | 4 +++- src/Image/index.tsx | 3 +++ src/PasswordBox/index.tsx | 1 + src/Separator/index.tsx | 1 + src/Slider/index.tsx | 3 +++ src/TextBox/index.tsx | 3 +++ src/Toggle/index.tsx | 1 + 18 files changed, 46 insertions(+), 9 deletions(-) diff --git a/docs/src/components/Icons/IconComponents.tsx b/docs/src/components/Icons/IconComponents.tsx index 0bfae15c..d60fc159 100644 --- a/docs/src/components/Icons/IconComponents.tsx +++ b/docs/src/components/Icons/IconComponents.tsx @@ -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 {} diff --git a/docs/src/components/Icons/IconGithub.tsx b/docs/src/components/Icons/IconGithub.tsx index 204ab597..f9ebbae6 100644 --- a/docs/src/components/Icons/IconGithub.tsx +++ b/docs/src/components/Icons/IconGithub.tsx @@ -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 {} diff --git a/docs/src/components/Icons/IconLayout.tsx b/docs/src/components/Icons/IconLayout.tsx index e562b762..c9de2896 100644 --- a/docs/src/components/Icons/IconLayout.tsx +++ b/docs/src/components/Icons/IconLayout.tsx @@ -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 {} diff --git a/docs/src/components/Icons/IconStyle.tsx b/docs/src/components/Icons/IconStyle.tsx index 115e6c6d..a2408936 100644 --- a/docs/src/components/Icons/IconStyle.tsx +++ b/docs/src/components/Icons/IconStyle.tsx @@ -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 {} diff --git a/docs/src/components/Icons/IconToolkits.tsx b/docs/src/components/Icons/IconToolkits.tsx index 06132143..f6007e7f 100644 --- a/docs/src/components/Icons/IconToolkits.tsx +++ b/docs/src/components/Icons/IconToolkits.tsx @@ -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 {} diff --git a/docs/src/components/ReactIcon.tsx b/docs/src/components/ReactIcon.tsx index 7a7faa9c..f59b4a1d 100644 --- a/docs/src/components/ReactIcon.tsx +++ b/docs/src/components/ReactIcon.tsx @@ -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 {} diff --git a/docs/src/components/Wrapper/components/Footer.tsx b/docs/src/components/Wrapper/components/Footer.tsx index bbfb847f..db1db9a5 100644 --- a/docs/src/components/Wrapper/components/Footer.tsx +++ b/docs/src/components/Wrapper/components/Footer.tsx @@ -51,7 +51,7 @@ export default class Footer extends React.Component { }, { children: "Fabric", href: "https://dev.office.com/fabric" - }] as React.HTMLAttributes[]} + }]} /> { links={[{ children: "Github", href: "https://github.com/myxvisual/react-uwp" - }] as React.HTMLAttributes[]} + }]} /> []; + links?: { + children?: React.ReactNode; + href?: string + }[]; } export interface FooterLinksProps extends DataProps, React.HTMLAttributes {} diff --git a/docs/src/routes/Components/AutoSuggestBox/ListSourceComplexExample.tsx b/docs/src/routes/Components/AutoSuggestBox/ListSourceComplexExample.tsx index ed7fc928..7a84b8bd 100644 --- a/docs/src/routes/Components/AutoSuggestBox/ListSourceComplexExample.tsx +++ b/docs/src/routes/Components/AutoSuggestBox/ListSourceComplexExample.tsx @@ -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) => ( -
+
{color} HeartFillLegacy
diff --git a/src/AutoSuggestBox/index.tsx b/src/AutoSuggestBox/index.tsx index c0b01b95..7b7d3872 100644 --- a/src/AutoSuggestBox/index.tsx +++ b/src/AutoSuggestBox/index.tsx @@ -28,6 +28,7 @@ export interface DataProps { * Control component `background` style. */ background?: string; + placeholder?: string; } export interface AutoSuggestBoxProps extends DataProps, React.HTMLAttributes {} diff --git a/src/CheckBox/index.tsx b/src/CheckBox/index.tsx index e4a77971..c477e573 100644 --- a/src/CheckBox/index.tsx +++ b/src/CheckBox/index.tsx @@ -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 {} diff --git a/src/HyperLink/index.tsx b/src/HyperLink/index.tsx index 32159b1e..24f1c26d 100644 --- a/src/HyperLink/index.tsx +++ b/src/HyperLink/index.tsx @@ -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 {} +export interface HyperLinkProps extends DataProps, React.HTMLAttributes {} export class HyperLink extends React.Component { static contextTypes = { theme: PropTypes.object }; diff --git a/src/Image/index.tsx b/src/Image/index.tsx index 55349b86..cc9ba38d 100644 --- a/src/Image/index.tsx +++ b/src/Image/index.tsx @@ -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 | React.ReactNode; + src?: string; + height?: string | number; } export interface ImageProps extends DataProps, React.HTMLAttributes {} diff --git a/src/PasswordBox/index.tsx b/src/PasswordBox/index.tsx index 91ad6413..e66e9fb5 100644 --- a/src/PasswordBox/index.tsx +++ b/src/PasswordBox/index.tsx @@ -17,6 +17,7 @@ export interface DataProps { * Control PasswordBox `height` and `icon size`. */ passwordBoxHeight?: number; + placeholder?: string; } export interface PasswordBoxProps extends DataProps, React.HTMLAttributes {} diff --git a/src/Separator/index.tsx b/src/Separator/index.tsx index 7c9251a1..91bdaa25 100644 --- a/src/Separator/index.tsx +++ b/src/Separator/index.tsx @@ -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 {} diff --git a/src/Slider/index.tsx b/src/Slider/index.tsx index 11aab1c9..7e44f742 100644 --- a/src/Slider/index.tsx +++ b/src/Slider/index.tsx @@ -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 {} diff --git a/src/TextBox/index.tsx b/src/TextBox/index.tsx index 40f9738d..e3aa1d3a 100644 --- a/src/TextBox/index.tsx +++ b/src/TextBox/index.tsx @@ -29,7 +29,10 @@ export interface DataProps { /** * Set TextBox `background`. */ + placeholder?: string; + disabled?: string | boolean; background?: string; + type?: string; } type Attributes = React.HTMLAttributes | React.HTMLAttributes; diff --git a/src/Toggle/index.tsx b/src/Toggle/index.tsx index 86e90064..1ba9a7e3 100644 --- a/src/Toggle/index.tsx +++ b/src/Toggle/index.tsx @@ -22,6 +22,7 @@ export interface DataProps { * Set custom Toggle `background`. */ background?: string; + checked?: boolean; } export interface ToggleProps extends DataProps, React.HTMLAttributes {}