Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for styling the borders used with modals. #610

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ func (m *Modal) SetButtonTextColor(color tcell.Color) *Modal {
return m
}

// SetBorderColor sets the color of the border.
func (m *Modal) SetBorderColor(color tcell.Color) *Modal {
m.frame.SetBorderColor(color)
return m
}

// SetBorder enables or disables the display of the border
func (m *Modal) SetBorder(show bool) *Modal {
m.frame.SetBorder(show)
return m
}

// SetDoneFunc sets a handler which is called when one of the buttons was
// pressed. It receives the index of the button as well as its label text. The
// handler is also called when the user presses the Escape key. The index will
Expand Down