diff --git a/block_section.go b/block_section.go index 01ffd5a1..0e2cdd3d 100644 --- a/block_section.go +++ b/block_section.go @@ -9,6 +9,7 @@ type SectionBlock struct { BlockID string `json:"block_id,omitempty"` Fields []*TextBlockObject `json:"fields,omitempty"` Accessory *Accessory `json:"accessory,omitempty"` + Expand bool `json:"expand",omitempty"` } // BlockType returns the type of the block @@ -25,6 +26,12 @@ func SectionBlockOptionBlockID(blockID string) SectionBlockOption { } } +func SectionBlockOptionExpand(expand bool) SectionBlockOption { + return func(block *SectionBlock) { + block.Expand = expand + } +} + // NewSectionBlock returns a new instance of a section block to be rendered func NewSectionBlock(textObj *TextBlockObject, fields []*TextBlockObject, accessory *Accessory, options ...SectionBlockOption) *SectionBlock { block := SectionBlock{