Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 36 additions & 50 deletions .storybook/components/Canvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,41 @@
:bg="colorMode === 'light' ? 'white' : 'gray.800'"
:color="colorMode === 'light' ? 'gray.800' : 'gray.50'"
class="root"
width="100vw"
height="100vh"
transition="all 0.2s ease-in-out"
>
<CHeading mb="50px" pos="absolute" top="3" left="50%" transform="translateX(-50%)" as="h4">@chakra-ui/vue</CHeading>
<CReset />
<CButton
as="a"
target="_blank"
href="https://github.com/chakra-ui/chakra-ui-vue"
position="fixed"
top="3"
left="3"
shadow="sm"
left-icon="github"
<CFlex justify-content="space-between" padding="4">
<CHeading mb="50px" as="h4">@chakra-ui/vue</CHeading>
<CReset />
<CButton
as="a"
target="_blank"
href="https://github.com/chakra-ui/chakra-ui-vue"
shadow="sm"
left-icon="github"
order="-1"
>
Github
</CButton>
<CIconButton
:aria-label="
`Switch to ${colorMode === 'light' ? 'dark' : 'light'} mode`
"
variant="solid"
:icon="colorMode === 'light' ? 'sun' : 'moon'"
@click="toggleColorMode"
>
</CIconButton>
</CFlex>
<CFlex
class="wrapper"
flex-direction="column"
justify-content="center"
align-items="center"
>
Github
</CButton>
<CIconButton
position="fixed"
top="3"
right="3"
:aria-label="`Switch to ${colorMode === 'light' ? 'dark' : 'light'} mode`"
variant="ghost"
:icon="colorMode === 'light' ? 'sun' : 'moon'"
@click="toggleColorMode"
>
</CIconButton>
<div class="wrapper">
<slot />
</div>
</CFlex>
</CBox>
</CColorModeProvider>
</CThemeProvider>
Expand All @@ -46,8 +53,10 @@ import {
CReset,
CButton,
CBox,
CFlex,
CIconButton,
CColorModeProvider } from '../../packages/chakra-ui-core/src'
CColorModeProvider
} from '../../packages/chakra-ui-core/src'

export default {
name: 'Canvas',
Expand All @@ -57,32 +66,9 @@ export default {
CReset,
CButton,
CBox,
CFlex,
CIconButton,
CColorModeProvider
}
}
</script>

<style lang="scss" scoped>
html,
body {
margin: 0
}
.root {
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: all 0.2s ease-in-out;
.wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%
}
}
</style>