Skip to content

Commit 11e10fd

Browse files
plagoafrancisco-guilhermeCopilot
committed
docs: add HvProvider to the Controls section (#4871)
* docs: add HvProvider to the Controls section * Update apps/docs/src/components/code/Playground.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: francisco-guilherme <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent bc1473f commit 11e10fd

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

apps/docs/src/components/code/Playground.tsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,34 +110,36 @@ export const Playground = ({
110110
aria-label="Playground"
111111
>
112112
{/* Component preview and controls */}
113-
<div className="grid grid-cols-[2fr_1fr] border rounded-t-round">
113+
<DocsProvider className="grid grid-cols-[2fr_1fr] border rounded-t-round">
114114
{/* Preview Area */}
115-
<DocsProvider className="grid place-items-center rounded-inherit p-sm h-full">
115+
<div className="grid place-items-center rounded-inherit p-sm h-full">
116116
{decoratorClassName ? (
117117
<div className={decoratorClassName}>{componentElement}</div>
118118
) : (
119119
componentElement
120120
)}
121-
</DocsProvider>
121+
</div>
122122

123123
{/* Controls Area */}
124-
<div className="flex flex-col gap-xs border-l border-color-inherit py-sm px-xs">
125-
{Object.entries(controls).map(([prop, control]) => {
126-
if (!control) return null;
127-
128-
return (
129-
<Controls
130-
key={prop}
131-
prop={prop}
132-
meta={meta}
133-
state={dynamicProps}
134-
control={control}
135-
onChange={updatePropValue}
136-
/>
137-
);
138-
})}
124+
<div className="rounded-inherit border-l border-color-inherit bg-white h-full">
125+
<div className="flex flex-col gap-xs py-sm px-xs">
126+
{Object.entries(controls).map(([prop, control]) => {
127+
if (!control) return null;
128+
129+
return (
130+
<Controls
131+
key={prop}
132+
prop={prop}
133+
meta={meta}
134+
state={dynamicProps}
135+
control={control}
136+
onChange={updatePropValue}
137+
/>
138+
);
139+
})}
140+
</div>
139141
</div>
140-
</div>
142+
</DocsProvider>
141143

142144
{/* Code editor */}
143145
<div className="max-h-100 overflow-auto rounded-b-round border border-t-0 max-h-250px">

0 commit comments

Comments
 (0)