66 :bg =" colorMode === 'light' ? 'white' : 'gray.800'"
77 :color =" colorMode === 'light' ? 'gray.800' : 'gray.50'"
88 class =" root"
9+ width =" 100vw"
10+ height =" 100vh"
11+ transition =" all 0.2s ease-in-out"
912 >
10- <CHeading mb =" 50px" pos =" absolute" top =" 3" left =" 50%" transform =" translateX(-50%)" as =" h4" >@chakra-ui/vue</CHeading >
11- <CReset />
12- <CButton
13- as =" a"
14- target =" _blank"
15- href =" https://github.com/chakra-ui/chakra-ui-vue"
16- position =" fixed"
17- top =" 3"
18- left =" 3"
19- shadow =" sm"
20- left-icon =" github"
13+ <CFlex justify-content =" space-between" padding =" 4" >
14+ <CHeading mb =" 50px" as =" h4" >@chakra-ui/vue</CHeading >
15+ <CReset />
16+ <CButton
17+ as =" a"
18+ target =" _blank"
19+ href =" https://github.com/chakra-ui/chakra-ui-vue"
20+ shadow =" sm"
21+ left-icon =" github"
22+ order =" -1"
23+ >
24+ Github
25+ </CButton >
26+ <CIconButton
27+ :aria-label ="
28+ `Switch to ${colorMode === 'light' ? 'dark' : 'light'} mode`
29+ "
30+ variant =" solid"
31+ :icon =" colorMode === 'light' ? 'sun' : 'moon'"
32+ @click =" toggleColorMode"
33+ >
34+ </CIconButton >
35+ </CFlex >
36+ <CFlex
37+ class =" wrapper"
38+ flex-direction =" column"
39+ justify-content =" center"
40+ align-items =" center"
2141 >
22- Github
23- </CButton >
24- <CIconButton
25- position =" fixed"
26- top =" 3"
27- right =" 3"
28- :aria-label =" `Switch to ${colorMode === 'light' ? 'dark' : 'light'} mode`"
29- variant =" ghost"
30- :icon =" colorMode === 'light' ? 'sun' : 'moon'"
31- @click =" toggleColorMode"
32- >
33- </CIconButton >
34- <div class =" wrapper" >
3542 <slot />
36- </div >
43+ </CFlex >
3744 </CBox >
3845 </CColorModeProvider >
3946 </CThemeProvider >
@@ -46,8 +53,10 @@ import {
4653 CReset ,
4754 CButton ,
4855 CBox ,
56+ CFlex ,
4957 CIconButton ,
50- CColorModeProvider } from ' ../../packages/chakra-ui-core/src'
58+ CColorModeProvider
59+ } from ' ../../packages/chakra-ui-core/src'
5160
5261export default {
5362 name: ' Canvas' ,
@@ -57,32 +66,9 @@ export default {
5766 CReset,
5867 CButton,
5968 CBox,
69+ CFlex,
6070 CIconButton,
6171 CColorModeProvider
6272 }
6373}
6474 </script >
65-
66- <style lang="scss" scoped>
67- html ,
68- body {
69- margin : 0
70- }
71- .root {
72- height : 100vh ;
73- width : 100vw ;
74- display : flex ;
75- flex-direction : column ;
76- justify-content : center ;
77- align-items : center ;
78- transition : all 0.2s ease-in-out ;
79- .wrapper {
80- display : flex ;
81- flex-direction : column ;
82- justify-content : center ;
83- align-items : center ;
84- width : 100% ;
85- height : 100%
86- }
87- }
88- </style >
0 commit comments