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

Commit 753a6d0

Browse files
committed
fix: fix tsx renders
1 parent d9c6c17 commit 753a6d0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/c-code/src/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const CCode = defineComponent({
3131
return (
3232
<chakra.code
3333
as={props.as}
34-
_css={{
34+
__css={{
3535
display: "inline-block",
3636
verticalAlign: "middle",
3737
fontSize: "sm",

packages/c-focus-lock/src/c-focus-lock.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,16 @@ export const CFocusLock = defineComponent({
160160
return
161161
}
162162

163+
const clone = cloneVNode(firstChild, {
164+
ref: target,
165+
...attrs,
166+
"data-chakra-focus-lock": "",
167+
})
168+
163169
return (
164-
<firstChild ref={target} data-chakra-focus-lock="" {...attrs}>
170+
<clone ref={target} data-chakra-focus-lock="" {...attrs}>
165171
{slots?.defaults?.({ enabled, hasFocus, activate, deactivate })}
166-
</firstChild>
172+
</clone>
167173
)
168174
}
169175
},

0 commit comments

Comments
 (0)