Skip to content

Commit

Permalink
chore: fix ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jaslioin committed Feb 16, 2022
1 parent 5725576 commit b039d48
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/components/Typography.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HTMLAttributes } from "react";
import styled from "styled-components";
import { defaultTheme } from "@/styles/theme";

type Variant = "primary";
export type TypographyProps = {
Expand All @@ -10,7 +9,7 @@ export type TypographyProps = {

export const Typography = ({
variant = "primary",
color = defaultTheme.colors.textDarker,
color = "black",
children,
...rest
}: TypographyProps) => (
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "normalize.css/normalize.css";
import "./styles/global.css";
import { StrictMode } from "react";
import ReactDOM from "react-dom";
import * as ReactDOM from "react-dom";
import { QueryClient, QueryClientProvider } from "react-query";
import App from "./App";

Expand Down
26 changes: 10 additions & 16 deletions src/pages/LoadingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from "styled-components";
import { Transition } from "react-transition-group";
import { CSSProperties } from "react";
import { FixedDiv } from "@/components/FixedDiv";
import { Z_INDEX } from "@/constants/zIndex";
Expand All @@ -21,20 +20,15 @@ const LoadingPage: React.FC = ({ children }) => {
const { isLoading } = useLoading();

return (
<Transition in={isLoading} timeout={400} appear>
{(state) => (
<StyledFixedDiv
position="full-page"
style={{
...defaultStyle,
...transitionStyles[state],
}}
>
Loading...
</StyledFixedDiv>
)}
</Transition>
);
<StyledFixedDiv
position="full-page"
style={{
...defaultStyle,
}}
>
Loading...
</StyledFixedDiv>
);
};
const StyledFixedDiv = styled(FixedDiv)`
z-index: ${Z_INDEX.LOADING};
Expand All @@ -43,6 +37,6 @@ const StyledFixedDiv = styled(FixedDiv)`
display: flex;
justify-content: center;
align-items: center;
top:0;
top: 0;
`;
export default LoadingPage;
2 changes: 1 addition & 1 deletion src/types/misc.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const DemoType = string
export type DemoType = string

0 comments on commit b039d48

Please sign in to comment.