Skip to content

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

PropertyDescriptionTypeDefault
indentSizeChange the indent.number | undefined0
childrenKubbNode | undefined-

Released under the MIT License.