Skip to content

Commit

Permalink
fix: Fixed components wrong type
Browse files Browse the repository at this point in the history
  • Loading branch information
myxvisual committed Jun 29, 2017
1 parent 86c5e59 commit b5d02c8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/src/routes/Components/ListView/SimpleExample.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from "react";
import * as PropTypes from "prop-types";

import ListView, { ListViewProps, ListItem } from "react-uwp/ListView";
import ListView, { ListViewProps } from "react-uwp/ListView";
import Separator from "react-uwp/Separator";
import CheckBox from "react-uwp/CheckBox";
import Toggle from "react-uwp/Toggle";
import Icon from "react-uwp/Icon";

const listSource: ListItem[] = [{
const listSource = [{
itemNode: <p>Text</p>
}, {
itemNode: <Separator />,
Expand Down
4 changes: 2 additions & 2 deletions docs/src/routes/Components/TreeView/SimpleExample.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import * as PropTypes from "prop-types";

import TreeView from "react-uwp/TreeView";
import TreeView, { TreeItem } from "react-uwp/TreeView";
import Icon from "react-uwp/Icon";
import CheckBox from "react-uwp/CheckBox";
import Toggle from "react-uwp/Toggle";
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class SimpleExample extends React.Component<{}, SimpleExampleStat
}, {
title: "D",
disabled: true
}]}
}] as TreeItem[]}
showFocus
background={theme.useFluentDesign ? (
theme.acrylicTexture40.background
Expand Down
5 changes: 4 additions & 1 deletion src/CheckBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ function getStyles(checkBox: CheckBox): {
overflow: "hidden"
});
const iconParentHoverStyle = { border: `2px solid ${theme.baseHigh}` };
let iconParent: React.CSSProperties;
let iconParent: {
style: React.CSSProperties;
hoverStyle: React.CSSProperties;
};

switch (checked) {
case true: {
Expand Down
2 changes: 1 addition & 1 deletion src/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class Icon extends React.Component<IconProps, IconState> {
} = this.props;
const { theme } = this.context;
const { hovered } = this.state;
return React.createElement(useSVGElement ? "text" : "span", {
return React.createElement(useSVGElement ? "text" as "span" : "span", {
...attributes,
onMouseEnter: this.handleMouseEnter,
onMouseLeave: this.handleMouseLeave,
Expand Down
2 changes: 1 addition & 1 deletion src/TreeView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class TreeView extends React.Component<TreeViewProps, TreeViewState> {
transition: "all .25s"
})}
>
{expanded && children.map((item: TreeItem[], index: number) => renderList(item, index, true, indexArray))}
{expanded && children.map((item: TreeItem, index: number) => renderList(item, index, true, indexArray))}
</div>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/darkTheme.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import getTheme from "./getTheme";
export default getTheme("dark");
export default getTheme({ themeName: "dark" });
2 changes: 1 addition & 1 deletion src/styles/lightTheme.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import getTheme from "./getTheme";

export default getTheme("light");
export default getTheme({ themeName: "dark" });

0 comments on commit b5d02c8

Please sign in to comment.