Skip to content

Text

Text

tsx
import React from "react"
import { 
createRoot
,
Text
} from '@kubb/react'
const
root
=
createRoot
()
const
Component
= () => {
return ( <
Text
>
export const test = 2; </
Text
>
) }
root
.
render
(<
Component
/>)
root
.
output
typescript
export const test = 2

Text with indent

tsx
import React from "react"
import { 
createRoot
,
Text
} from '@kubb/react'
const
root
=
createRoot
()
const
Component
= () => {
return ( <
Text
indentSize
={2}>
export const test = 2; </
Text
>
) }
root
.
render
(<
Component
/>)
root
.
output
typescript
export const test = 2

API

tsx
import React from "react"
import { 
Text
} from '@kubb/react'
type
Props
= React.
ComponentProps
<typeof
Text
>
PropertyDescriptionTypeDefault
indentSizeChange the indent.number | undefined0
childrenKubbNode | undefined-

Released under the MIT License.