Skip to content

Commit

Permalink
style(custom): #4 Add theme guideline.
Browse files Browse the repository at this point in the history
  • Loading branch information
pakerchang committed Jun 5, 2023
1 parent 74dddbd commit d6ee650
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
10 changes: 8 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { Box, Flex } from "@chakra-ui/react";
import { Box, Flex, Button } from "@chakra-ui/react";

function App() {
return (
<Box pos="fixed" zIndex={100} top={50} right={0} w="200px" h="90vh" mr="15px" opacity={0.5}>
<Box pos="fixed" zIndex={100} top={0} right={0} w="200px" h="90vh" mt="25px" mr="15px" opacity={0.7}>
<Box>Drawer</Box>
<Flex h="100%" flexDirection="column" alignItems="center" justifyContent="space-around" borderRadius="15px" bgColor="primaryBg">
<Button size="customBtn" variant="quickRespButton">
Testing
</Button>
<Button size="customBtn" variant="promptButton">
Testing
</Button>
</Flex>
</Box>
);
Expand Down
25 changes: 19 additions & 6 deletions src/styles/theme.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import { extendTheme } from "@chakra-ui/react";

const config = {
initialColorMode: "light",
useSystemColorMode: false,
};

const theme = extendTheme({
config,
colors: {
primaryBg: "#112D4E",
promptBtn: "#3F72AF",
quickRespBtn: "#DBE2Ef",
settingBtn: "#F9F7F7",
},
components: {
Button: {
sizes: {
customBtn: {
width: "180px",
height: "35px",
},
},
variants: {
promptButton: (props: any) => ({
bg: props.theme.colors.promptBtn,
color: "white",
}),
quickRespButton: (props: any) => ({
bg: props.theme.colors.quickRespBtn,
}),
},
},
},
});

export default theme;

0 comments on commit d6ee650

Please sign in to comment.