diff options
Diffstat (limited to 'public/bluebey-studio/src/ui.js')
| -rw-r--r-- | public/bluebey-studio/src/ui.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/public/bluebey-studio/src/ui.js b/public/bluebey-studio/src/ui.js index 46c5adb..b4c7d24 100644 --- a/public/bluebey-studio/src/ui.js +++ b/public/bluebey-studio/src/ui.js @@ -95,6 +95,17 @@ function secIcon(d) { } /** + * A standalone 24x24 stroke icon (the same drawing as a tab's), for a plain + * button that has no label of its own. + */ +export function icon(d, size = 18) { + const svg = tabIcon(d); + svg.setAttribute('width', String(size)); + svg.setAttribute('height', String(size)); + return svg; +} + +/** * Tabbed container: returns the per-tab panels to fill in. When a definition * carries an `icon` (an SVG path `d`) the tab shows only that icon, and the * label becomes its tooltip and accessible name; without one the label shows. |
