mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-10 19:16:20 +00:00
allow border option to be a string.
This commit is contained in:
parent
1f17a48af3
commit
82322ac017
@ -1720,6 +1720,9 @@ function Element(options) {
|
||||
|
||||
this.border = options.border;
|
||||
if (this.border) {
|
||||
if (typeof this.border === 'string') {
|
||||
this.border = { type: this.border };
|
||||
}
|
||||
this.border.type = this.border.type || 'bg';
|
||||
if (this.border.type === 'ascii') this.border.type = 'line';
|
||||
this.border.ch = this.border.ch || ' ';
|
||||
|
Loading…
x
Reference in New Issue
Block a user