Created
November 4, 2020 06:37
-
-
Save gaurangrshah/ef1057175d6526ddc7c0f3efe5f1d76f to your computer and use it in GitHub Desktop.
#chakra-ui #components #config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const base = { | |
py: [6, null, null, 4], | |
px: [6, null, null, 1], | |
mx: "auto", | |
maxW: "7xl", // WRAPPER_MAX_WIDTH | |
justify: ["space-between"], | |
// align: ["stretch", null, null, "center"], | |
wrap: ["wrap", null, null, "nowrap"], | |
} | |
const header = { | |
baseStyle: {}, | |
sizes: {}, | |
variants: { | |
base: { | |
py: [3, null, null, 3], | |
px: [6, null, null, 3], | |
maxW: ["3xl", null, null, "7xl"], // WRAPPER_MAX_WIDTH | |
mx: "auto", | |
justifyContent: ["space-between"], | |
}, | |
mobile: { | |
display: ["flex", null, null, "none"], | |
flexDirection: "column", | |
align: ["stretch"], | |
wrap: ["wrap"], | |
py: 10, | |
flex: 1, | |
fontSize: "lg", | |
overflow: "hidden", | |
}, | |
desktop: { | |
display: ["none", null, null, "flex"], | |
flexDirection: "row", | |
justifyContent: "flex-end", | |
alignItems: [null, null, null, "center"], | |
wrap: ["wrap", null, null, "nowrap"], | |
px: 6, | |
flex: 1, | |
fontSize: [null, null, null, "md"], | |
overflow: "hidden", | |
}, | |
}, | |
defaultProps: {}, | |
} | |
export default header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { linearGradient } from "../../components/chakra-ui" | |
const hero = { | |
parts: ["base", "content", "block"], | |
baseStyle: { | |
base: { | |
h: ["30vh", null, null, "50vh"], | |
background: linearGradient(14), | |
}, | |
content: { | |
position: "absolute", | |
top: 0, | |
right: 0, | |
left: 0, | |
mx: "auto", | |
mt: [12 * 4, "20%", null, 12 * 4], | |
maxW: ["5xl", null, null, null, "60%"], | |
}, | |
block: { | |
position: "relative", | |
mx: 0, | |
}, | |
}, | |
sizes: {}, | |
variants: {}, | |
defaultProps: {}, | |
} | |
export default hero |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Button from "./buttons" | |
import header from "./header" | |
import footer from "./footer" | |
import hero from "./hero" | |
export default { | |
header, | |
footer, | |
Button, | |
hero, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment