Optional
componentComponent for rendering a text style.
See also BlockStyleProps
@sanity/ui
.
This will make sure your rendering looks good independent of the theme context it appears in.contentEditable={false}
.and bolder, but will adapt to what the current @sanity/ui
theme has defined
as actual values for weight "bold" and size={3}
.
import {Text} from '@sanity/ui'
const LeadStyle = (props: BlockStyleProps) => (
<Text weight="bold" size={3}>
{props.children}
</Text>
)
Schema definition for a text block style. A text block may have a block style like 'header', 'normal', 'lead' attached to it, which is stored on the
.style
property for that block.Remarks
The first defined style will become the default style.´´
Example: The default set of styles
Example: Example of defining a block type with custom styles and render components.