dividerBlock.ts
TLDR
This file dividerBlock.ts
exports a single function and a custom type. The function createDividerBlock
creates a DividerBlock
object, which is a specific type of ContentBlock
. This block is used to represent a divider in the user interface.
Methods
createDividerBlock
This method creates a DividerBlock
object. It takes an optional block
parameter of type Block
. The createDividerBlock
function returns a DividerBlock
object with the type
property set to 'divider'
. This block can be used to represent a divider in the user interface.
Classes
No classes are defined in this file.
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Block, createBlock} from './block'
import {ContentBlock} from './contentBlock'
type DividerBlock = ContentBlock & {
type: 'divider'
}
function createDividerBlock(block?: Block): DividerBlock {
return {
...createBlock(block),
type: 'divider',
}
}
export {DividerBlock, createDividerBlock}