From 4f66010c494174e03a7558c5ee54b01f4434accd Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 28 May 2021 01:34:32 -0700 Subject: [PATCH] Add support for styling the borders used with modals. --- modal.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modal.go b/modal.go index 4e9aa5ce..1fc33316 100644 --- a/modal.go +++ b/modal.go @@ -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