Skip to content

Commit

Permalink
Merge pull request #734 from d15ky/patch-1
Browse files Browse the repository at this point in the history
Add Style to ConfirmationBlockObject
  • Loading branch information
ollieparsley authored May 31, 2020
2 parents c78c411 + 2fbb1da commit 625ac52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions block_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,19 @@ type ConfirmationBlockObject struct {
Text *TextBlockObject `json:"text"`
Confirm *TextBlockObject `json:"confirm"`
Deny *TextBlockObject `json:"deny"`
Style Style `json:"style,omitempty"`
}

// validateType enforces block objects for element and block parameters
func (s ConfirmationBlockObject) validateType() MessageObjectType {
return motConfirmation
}

// add styling to confirmation object
func (s *ConfirmationBlockObject) WithStyle(style Style) {
s.Style = style
}

// NewConfirmationBlockObject returns an instance of a new Confirmation Block Object
func NewConfirmationBlockObject(title, text, confirm, deny *TextBlockObject) *ConfirmationBlockObject {
return &ConfirmationBlockObject{
Expand Down

0 comments on commit 625ac52

Please sign in to comment.