Text
Text
tsx
import { createRoot, Text } from '@kubb/react'
const root = createRoot()
const Component = () => {
return (
<Text>
export const test = 2;
</Text>
)
}
root.render(<Component />)
return root.output
typescript
export const test = 2
Text with indent
tsx
import { createRoot, Text } from '@kubb/react'
const root = createRoot()
const Component = () => {
return (
<Text indentSize={2}>
export const test = 2;
</Text>
)
}
root.render(<Component />)
return root.output
typescript
export const test = 2
API
Property | Description | Type | Default |
---|---|---|---|
indentSize | Change the indent. | number | undefined | 0 |
children | KubbNode | undefined | - |