h3Block.tsx
TLDR
This file contains a single method and a type definition related to creating and manipulating H3 blocks.
Methods
createH3Block
This method creates and returns a new H3Block object. It accepts an optional block
parameter as input, which is used to create the H3 block object. If no block
parameter is provided, the method assigns a default block value to the newly created H3 block object. The method returns the created H3Block object.
Classes
None
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {ContentBlock} from './contentBlock'
import {Block, createBlock} from './block'
type H3Block = ContentBlock & {
type: 'h3'
}
function createH3Block(block?: Block): H3Block {
return {
...createBlock(block),
type: 'h3',
}
}
export {H3Block, createH3Block}