From 80ce89daced9d9915ab200dfc594564df7fa683c Mon Sep 17 00:00:00 2001 From: Daniel Olabemiwo Date: Tue, 30 May 2023 19:28:27 +0100 Subject: [PATCH 1/4] docs(box): add box documentation --- components/content/examples/box/AirBnbBox.vue | 50 ++++++++ components/content/examples/box/AsBox.vue | 5 + components/content/examples/box/SimpleBox.vue | 11 ++ content/4.components/box.md | 110 ++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 components/content/examples/box/AirBnbBox.vue create mode 100644 components/content/examples/box/AsBox.vue create mode 100644 components/content/examples/box/SimpleBox.vue create mode 100644 content/4.components/box.md diff --git a/components/content/examples/box/AirBnbBox.vue b/components/content/examples/box/AirBnbBox.vue new file mode 100644 index 0000000..5618b82 --- /dev/null +++ b/components/content/examples/box/AirBnbBox.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/components/content/examples/box/AsBox.vue b/components/content/examples/box/AsBox.vue new file mode 100644 index 0000000..b9cbf60 --- /dev/null +++ b/components/content/examples/box/AsBox.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/components/content/examples/box/SimpleBox.vue b/components/content/examples/box/SimpleBox.vue new file mode 100644 index 0000000..b02d940 --- /dev/null +++ b/components/content/examples/box/SimpleBox.vue @@ -0,0 +1,11 @@ + + + diff --git a/content/4.components/box.md b/content/4.components/box.md new file mode 100644 index 0000000..db5697e --- /dev/null +++ b/content/4.components/box.md @@ -0,0 +1,110 @@ +--- +title: Box +description: Box component +version: 2.0+ +--- +# Box + +Box is the most abstract component on top of which all other `@chakra-ui/vue` components are built. By default, it renders a `div` element + +## Import + +Chakra UI Vue exports 5 accordion-related components. +```js +import { CBox } from "@chakra-ui/vue-next" +``` + +## Usage + +The Box component is useful because it helps with three common use cases: +- Create responsive layouts with ease. +- Provide a shorthand way to pass styles via props (`bg` instead of `backgroundColor`). +- Compose new component and allow for override using the `as` prop. + +::showcase +:simple-box +:: + + +```html + + This is the Box + +``` + +## Composition with `CBox` + +::showcase +:air-bnb-box{width=full} +:: + +```html + + + +``` + +## as prop + +You can use the `as` prop to change the element render, just like styled-components. + +::showcase +:as-box{width-full} +:: + +```html + + Button + +``` + +## Props + +See all `CBox` props in the [Style props page](/styled-system/style-props) \ No newline at end of file From 53344c2f7771e4150fc25dc07831c914255cf199 Mon Sep 17 00:00:00 2001 From: Daniel Olabemiwo Date: Thu, 1 Jun 2023 22:23:07 +0100 Subject: [PATCH 2/4] chore: resolve code review --- content/4.components/box.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/4.components/box.md b/content/4.components/box.md index db5697e..e3cb069 100644 --- a/content/4.components/box.md +++ b/content/4.components/box.md @@ -8,8 +8,6 @@ version: 2.0+ Box is the most abstract component on top of which all other `@chakra-ui/vue` components are built. By default, it renders a `div` element ## Import - -Chakra UI Vue exports 5 accordion-related components. ```js import { CBox } from "@chakra-ui/vue-next" ``` @@ -27,9 +25,9 @@ The Box component is useful because it helps with three common use cases: ```html - - This is the Box - + + This is the Box + ``` ## Composition with `CBox` From 47e2b16fa919808fed3e4b8a95b45e0d6c729c94 Mon Sep 17 00:00:00 2001 From: Daniel Olabemiwo Date: Fri, 7 Jul 2023 09:15:55 +0100 Subject: [PATCH 3/4] refactor: change name casing box --- content/4.components/box.md | 52 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/content/4.components/box.md b/content/4.components/box.md index e3cb069..53492b2 100644 --- a/content/4.components/box.md +++ b/content/4.components/box.md @@ -25,9 +25,9 @@ The Box component is useful because it helps with three common use cases: ```html - + This is the Box - + ``` ## Composition with `CBox` @@ -38,36 +38,36 @@ The Box component is useful because it helps with three common use cases: ```html