From 6f3fefc3cbd394f869bfad0422cb16c716204e31 Mon Sep 17 00:00:00 2001 From: RabbitDoge <72658581+RabbitDoge@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:07:47 +0900 Subject: [PATCH] fix: Build and add build step to workflow (#43) --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ src/components/Svg/Svg.tsx | 3 ++- src/widgets/Nav/types.ts | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..c8fdeb6eb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2.1.0 + with: + node-version: 14.x + + - name: Install dependencies + run: yarn install + + - name: Run Build + run: yarn build diff --git a/src/components/Svg/Svg.tsx b/src/components/Svg/Svg.tsx index 6b4706689..e0b88ad64 100644 --- a/src/components/Svg/Svg.tsx +++ b/src/components/Svg/Svg.tsx @@ -3,7 +3,7 @@ import { space } from "styled-system"; import getThemeValue from "../../util/getThemeValue"; import SvgProps from "./types"; -const Svg = styled.svg.attrs({ xmlns: "http://www.w3.org/2000/svg" })` +const Svg = styled.svg` fill: ${({ theme, color }) => getThemeValue(`colors.${color}`, color)(theme)}; ${space} `; @@ -11,6 +11,7 @@ const Svg = styled.svg.attrs({ xmlns: "http://www.w3.org/2000/svg" })` Svg.defaultProps = { color: "text", width: "20px", + xmlns: "http://www.w3.org/2000/svg", }; export default Svg; diff --git a/src/widgets/Nav/types.ts b/src/widgets/Nav/types.ts index d1477fd05..6e29d15e4 100644 --- a/src/widgets/Nav/types.ts +++ b/src/widgets/Nav/types.ts @@ -5,7 +5,7 @@ export type NavTheme = { export interface ConnectCallbackType { key: "metamask" | "trustwallet" | "mathwallet" | "tokenpocket" | "walletconnect"; - callback: () => void; + callback: () => null; } export interface NavProps {