Usage
Wrap any content with the code-preview component to display a live preview alongside its source code using the code slot.
inline code
`inline code`
::code-preview
`inline code`
#code
```mdc
`inline code`
```
::
API
Props
Slots
Theme
https://github.com/bitrix24/b24ui/tree/main/src/theme/code-preview.ts
export default {
slots: {
root: 'my-5',
preview: 'flex justify-center border border-(--ui-color-design-tinted-na-stroke) relative p-4 rounded-md',
code: '[&>div>pre]:rounded-t-none [&>div]:my-0'
},
variants: {
code: {
true: {
preview: 'border-b-0 rounded-b-none'
}
}
}
}