chore(docs): Updated UI Reference (automated) (#9726)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-10-24 09:38:58 +00:00
committed by GitHub
parent 432af1e2d1
commit e196ad7659
99 changed files with 2962 additions and 2581 deletions

View File

@@ -41,6 +41,29 @@ import { CodeBlock } from "@medusajs/ui"
"CodeBlock.Body"
]} />
## Usage Outside Medusa Admin
---
If you're using the `CodeBlock` component in a project other than the Medusa Admin, make sure to include the `TooltipProvider` somewhere up in your component tree, as the `CodeBlock.Header` component uses a [Tooltip](/components/tooltip#usage-outside-medusa-admin):
```tsx
<TooltipProvider>
<CodeBlock
snippets={[
{
language: "tsx",
label: "Label",
code: "import { useProduct } from \"medusa-react\"",
},
]}
>
<CodeBlock.Header />
<CodeBlock.Body />
</CodeBlock>
</TooltipProvider>
```
## Examples
---