diff --git a/panel/models/card.ts b/panel/models/card.ts index dc4bd37dbea..346f5c0f892 100644 --- a/panel/models/card.ts +++ b/panel/models/card.ts @@ -5,6 +5,14 @@ import type * as p from "@bokehjs/core/properties" import card_css from "styles/models/card.css" +const CHEVRON_RIGHT = ` + +` + +const CHEVRON_DOWN = ` + +` + export class CardView extends ColumnView { declare model: Card @@ -73,7 +81,7 @@ export class CardView extends ColumnView { if (this.model.collapsible) { this.button_el = DOM.createElement("button", {type: "button", class: header_css_classes}) const icon = DOM.createElement("div", {class: button_css_classes}) - icon.innerHTML = this.model.collapsed ? "\u25ba" : "\u25bc" + icon.innerHTML = this.model.collapsed ? CHEVRON_RIGHT : CHEVRON_DOWN this.button_el.appendChild(icon) this.button_el.style.backgroundColor = header_background != null ? header_background : "" this.button_el.style.cursor = "pointer" @@ -143,7 +151,7 @@ export class CardView extends ColumnView { } else { this.collapsed_style.clear() } - this.button_el.children[0].innerHTML = this.model.collapsed ? "\u25ba" : "\u25bc" + this.button_el.children[0].innerHTML = this.model.collapsed ? CHEVRON_RIGHT : CHEVRON_DOWN this.invalidate_layout() }