refactoring for useStyles hook
This commit is contained in:
@@ -9,7 +9,7 @@ import { DocumentStyle, WelcomePage } from '../styles/Style';
|
|||||||
|
|
||||||
const { pageTheme, galleryTheme, cardTheme } = WelcomePage;
|
const { pageTheme, galleryTheme, cardTheme } = WelcomePage;
|
||||||
|
|
||||||
const { colorThemes, linkStyle } = DocumentStyle;
|
const { colorThemes, linkStyle, buttonStyle } = DocumentStyle;
|
||||||
const { themeA } = colorThemes;
|
const { themeA } = colorThemes;
|
||||||
|
|
||||||
|
|
||||||
@@ -25,9 +25,7 @@ export default function Welcome() {
|
|||||||
<h3 className="do-stuff">Thanks for visiting! Feel free to peruse below:</h3>
|
<h3 className="do-stuff">Thanks for visiting! Feel free to peruse below:</h3>
|
||||||
|
|
||||||
<div style={galleryTheme} className="gallery">
|
<div style={galleryTheme} className="gallery">
|
||||||
<Paper elevation={5} sx={[themeA, cardTheme]}>
|
<Button variant="contained" href="/projects" sx={buttonStyle}>What kinds of things do I do?</Button>
|
||||||
<Button href="/projects" sx={linkStyle}>What kinds of things do I do?</Button>
|
|
||||||
</Paper>
|
|
||||||
|
|
||||||
<Paper elevation={5} sx={[themeA, cardTheme]}>
|
<Paper elevation={5} sx={[themeA, cardTheme]}>
|
||||||
<Button href="/technologies" sx={linkStyle}>What do I use to do it?</Button>
|
<Button href="/technologies" sx={linkStyle}>What do I use to do it?</Button>
|
||||||
|
|||||||
@@ -1,4 +1,43 @@
|
|||||||
import { red, pink, deepPurple, purple } from '@mui/material/colors';
|
import { red, green, pink, deepPurple, purple } from '@mui/material/colors';
|
||||||
|
import { makeStyles } from '@mui/material';
|
||||||
|
|
||||||
|
export const useStyles = makeStyles({
|
||||||
|
colorThemeA: {
|
||||||
|
backgroundColor: pink[50],
|
||||||
|
color: deepPurple[300]
|
||||||
|
},
|
||||||
|
html: {
|
||||||
|
backgroundColor: purple[200],
|
||||||
|
},
|
||||||
|
muiButton: {
|
||||||
|
backgroundColor: deepPurple[200],
|
||||||
|
color: deepPurple[500],
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: green[400],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
welcomePage: {
|
||||||
|
display: 'flex',
|
||||||
|
backgroundColor: purple[100],
|
||||||
|
height: '100vh',
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
overflowX: 'hidden'
|
||||||
|
},
|
||||||
|
gallery: {
|
||||||
|
display: 'flex',
|
||||||
|
width: '90vw',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
card: {
|
||||||
|
width: '250px',
|
||||||
|
height: '250px',
|
||||||
|
margin: '2rem',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export const DocumentStyle = {
|
export const DocumentStyle = {
|
||||||
colorThemes: {
|
colorThemes: {
|
||||||
@@ -6,9 +45,6 @@ export const DocumentStyle = {
|
|||||||
backgroundColor: pink[50],
|
backgroundColor: pink[50],
|
||||||
color: deepPurple[300]
|
color: deepPurple[300]
|
||||||
},
|
},
|
||||||
themeB: {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
htmlTheme: {
|
htmlTheme: {
|
||||||
backgroundColor: purple[200]
|
backgroundColor: purple[200]
|
||||||
@@ -16,6 +52,13 @@ export const DocumentStyle = {
|
|||||||
linkStyle: {
|
linkStyle: {
|
||||||
color: deepPurple[300],
|
color: deepPurple[300],
|
||||||
textDecoration: 'none'
|
textDecoration: 'none'
|
||||||
|
},
|
||||||
|
buttonStyle: {
|
||||||
|
backgroundColor: deepPurple[200],
|
||||||
|
color: deepPurple[500],
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: green[400],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user