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

Styled components update to v5.0.1 #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .storybook/config.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { configure, addDecorator } from "@storybook/react";
import { withInfo } from "@storybook/addon-info";
import { ThemeProvider } from "../src/styled-components";
import { ThemeProvider } from "styled-components";
import { createTheme } from "../src/theme/createTheme";
import { createPalette } from "../src/theme/createPalette";

Expand Down
149 changes: 97 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@types/react-transition-group": "^2.0.11",
"@types/storybook__addon-info": "^4.1.2",
"@types/storybook__react": "^4.0.2",
"@types/styled-components": "^4.4.3",
"babel-loader": "^8.0.6",
"bignumber.js": "^8.0.1",
"husky": "^1.0.0-rc.9",
Expand All @@ -47,7 +48,7 @@
"react-dom": "^16.8.6",
"react-scripts": "^3.0.1",
"rimraf": "^2.6.2",
"styled-components": "^3.4.2",
"styled-components": "^5.0.1",
"ts-loader": "^6.0.4",
"tslib": "^1.9.3",
"tslint": "^5.18.0",
Expand All @@ -74,6 +75,6 @@
"mobx-react": ">=5.1.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"styled-components": "^3.4.2"
"styled-components": "^5.0.1"
}
}
2 changes: 1 addition & 1 deletion src/ErrorBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import { ErrorBox } from "./ErrorBox";
import styled from "./styled-components";
import styled from "styled-components";

const PrimaryWrapper = styled.div`
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/LoadingBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import { LoadingBox } from "./LoadingBox";
import styled from "./styled-components";
import styled from "styled-components";

const PrimaryWrapper = styled.div`
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/MessageBox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { storiesOf } from "@storybook/react";
import { MessageBox } from "./MessageBox";
import { InfoIcon } from "./icon/InfoIcon";
import styled from "./styled-components";
import styled from "styled-components";

const PrimaryWrapper = styled.div`
position: relative;
Expand Down
4 changes: 2 additions & 2 deletions src/MessageBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import styled from "./styled-components";
import styled from "styled-components";
import { ISvgIconProps } from "./util/react/SvgIcon";
import { IBoxColorsThunk } from "./layout/content/box/IBoxColorsThunk";
import { ITheme } from "./theme/ITheme";
Expand All @@ -17,7 +17,7 @@ const colorSets: Record<IMessageBoxColors, IBoxColorsThunk<ITheme>> = {
})
};

const MessageBoxRoot = styled<IMessageBoxRootProps, "div">("div")`
const MessageBoxRoot = styled.div<IMessageBoxRootProps>`
position: absolute;
top: 50%;
left: 50%;
Expand Down
2 changes: 1 addition & 1 deletion src/control/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { storiesOf } from "@storybook/react";
import { Button } from "./Button";
import { ArrowForwardIcon } from "../icon/ArrowForwardIcon";
import styled from "../styled-components";
import styled from "styled-components";
import { SpinnerLite } from "../fx/SpinnerLite";

const ButtonContainer = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions src/control/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import styled, { css } from "../styled-components";
import styled, { css } from "styled-components";
import { Box, IBoxProps } from "../layout/content/box/Box";
import { IBoxColorsThunk } from "../layout/content/box/IBoxColorsThunk";
import { HoverState } from "../util/react/HoverState";
Expand All @@ -14,7 +14,7 @@ interface IButtonRootProps {
shadowColor(theme: ITheme): string | undefined;
}

const ButtonRoot = styled<IButtonRootProps, "button">("button")`
const ButtonRoot = styled.button<IButtonRootProps>`
${props => !props.disabled ? css`
cursor: pointer;
` : ``}
Expand Down
2 changes: 1 addition & 1 deletion src/control/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import { Checkbox } from "./Checkbox";
import styled from "../styled-components";
import styled from "styled-components";

const CheckboxContainer = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/control/ExternalLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { AnchorHTMLAttributes } from "react";
import styled from "../styled-components";
import styled from "styled-components";

const ExternalLinkRoot = styled.a`
text-decoration: none;
Expand Down
4 changes: 2 additions & 2 deletions src/control/IconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import styled, { withTheme } from "../styled-components";
import styled, { withTheme } from "styled-components";
import { ITheme } from "../theme/ITheme";

interface IIconProps {
Expand All @@ -26,7 +26,7 @@ interface IIconButtonRootProps {
onClick?(): void;
}

const IconButtonRoot = styled<IIconButtonRootProps, "button">("button")`
const IconButtonRoot = styled.button<IIconButtonRootProps>`
display: block;
background-color: transparent;
border: none; /* Remove borders */
Expand Down
2 changes: 1 addition & 1 deletion src/control/Input.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import { Input } from "./Input";
import styled from "../styled-components";
import styled from "styled-components";

const InputContainer = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/control/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled, { css } from "../styled-components";
import styled, { css } from "styled-components";
import Color from "color";

const HEIGHT = 36;
Expand Down
2 changes: 1 addition & 1 deletion src/control/Radio.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { storiesOf } from "@storybook/react";
import { Radio } from "./Radio";
import { Button } from "./Button";
import styled from "../styled-components";
import styled from "styled-components";

const RadioContainer = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/control/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { storiesOf } from "@storybook/react";
import styled from "../styled-components";
import styled from "styled-components";
import { Select } from "./Select";
import { GithubIcon } from "../icon/GithubIcon";
import { Option } from "./Option";
Expand Down
Loading