Skip to content

Commit

Permalink
fix: update theming using use theme hook (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
amalv authored Dec 17, 2019
1 parent a468299 commit 5925d01
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/Question.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from "react";
import { ThemeProvider, StylesProvider } from "@material-ui/core/styles";
import { StylesProvider, useTheme } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import Box from "@material-ui/core/Box";
import theme from "../MuiTheme";
import { Input } from "./Input";
import { Button } from "./Button";
import { BasePaper, Title } from "./Question.styles";

export const Question: React.FC = () => (
<StylesProvider injectFirst>
<ThemeProvider theme={theme}>
export const Question: React.FC = () => {
const theme = useTheme();
return (
<StylesProvider injectFirst>
<BasePaper>
<Grid container direction="column">
<Grid item>
Expand All @@ -23,7 +23,7 @@ export const Question: React.FC = () => (
<Input
label="title"
placeholder="Title here..."
borderColor="#6200ee"
borderColor={theme.palette.primary.main}
fullWidth
/>
</Grid>
Expand All @@ -37,7 +37,7 @@ export const Question: React.FC = () => (
rows="8"
label="content"
placeholder="Content here..."
borderColor="#6200ee"
borderColor={theme.palette.primary.main}
fullWidth
/>
</Grid>
Expand All @@ -54,6 +54,6 @@ export const Question: React.FC = () => (
</Grid>
</Grid>
</BasePaper>
</ThemeProvider>
</StylesProvider>
);
</StylesProvider>
);
};

1 comment on commit 5925d01

@vercel
Copy link

@vercel vercel bot commented on 5925d01 Dec 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.