Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fix(components): Add missing as prop on some layout components
Browse files Browse the repository at this point in the history
  • Loading branch information
carwack committed Oct 7, 2023
1 parent 02e56d8 commit 05bad5f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion @types/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* This is a generated file. Do not edit it's contents.
*
* This file was generated on 2023-05-20T11:19:16.919Z
* This file was generated on 2023-09-11T16:17:50.573Z
*/

import { ChakraProps, chakra } from "@chakra-ui/vue-system"
Expand Down
2 changes: 1 addition & 1 deletion components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* This is a generated file. Do not edit it's contents.
*
* This file was generated on 2023-05-20T11:19:16.919Z
* This file was generated on 2023-09-11T16:17:50.573Z
*/

import { ChakraProps, chakra } from "@chakra-ui/vue-system"
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/examples/base-stack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<chakra.div py="4">
<chakra.div>Vertical</chakra.div>
<c-v-stack spacing="2" align="stretch">
<c-v-stack as="ul" spacing="2" align="stretch">
<chakra.div h="40px" bg="yellow.200"> 1 </chakra.div>
<chakra.div h="40px" bg="tomato"> 2 </chakra.div>
<chakra.div h="40px" bg="pink.100"> 3 </chakra.div>
Expand Down
3 changes: 2 additions & 1 deletion packages/layout/src/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type * as CSS from "csstype"

export interface ContainerProps
extends HTMLChakraProps<"div">,
ThemingProps<"Container"> {
ThemingProps<"Container"> {
/**
* If `true`, container will center its children
* regardless of their width.
Expand Down Expand Up @@ -54,6 +54,7 @@ export const CContainer = defineComponent({
return () => (
<chakra.div
__label="container"
as={props.as}
__css={{
...styles.value,
...(props.centerContent && {
Expand Down
1 change: 1 addition & 0 deletions packages/layout/src/kbd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const CKbd = defineComponent({
return () => (
<chakra.kbd
__label="kbd"
as={props.as}
__css={{ fontFamily: "mono", ...styles.value }}
{...attrs}
>
Expand Down
6 changes: 1 addition & 5 deletions packages/layout/src/link.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { vueThemingProps } from "@chakra-ui/vue-utils"
import { HTMLChakraProps } from "@chakra-ui/vue-system"
import { h, defineComponent, PropType, computed } from "vue"
import {
chakra,
DOMElements,
useStyleConfig,
} from "@chakra-ui/vue-system"
import { chakra, DOMElements, useStyleConfig } from "@chakra-ui/vue-system"
import { ThemingProps } from "@chakra-ui/styled-system"
import { filterUndefined } from "@chakra-ui/utils"
import type * as CSS from "csstype"
Expand Down
1 change: 1 addition & 0 deletions packages/layout/src/stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export const CStack = defineComponent({
return (
<chakra.div
__label={"stack"}
as={props.as}
display={"flex"}
alignItems={props.align}
justifyContent={props.justify}
Expand Down
1 change: 1 addition & 0 deletions packages/layout/src/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const CText = defineComponent({
return () => {
return (
<chakra.p
as={props.as}
__label="text"
{...aliasedProps.value}
__css={styles.value}
Expand Down

0 comments on commit 05bad5f

Please sign in to comment.