@mapbox-controls/helpers
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -18,2 +18,3 @@ /** | ||
* @param {boolean=} options.disabled | ||
* @param {boolean=} options.hidden | ||
* @param {string=} options.className | ||
@@ -37,2 +38,5 @@ * @param {() => void=} options.onClick | ||
} | ||
if (options.hidden) { | ||
button.hidden = true; | ||
} | ||
if (options.className) { | ||
@@ -39,0 +43,0 @@ button.classList.add(options.className); |
{ | ||
"name": "@mapbox-controls/helpers", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Helpers for mapbox controls", | ||
@@ -8,5 +8,5 @@ "type": "module", | ||
"devDependencies": { | ||
"@types/geojson": "7946.0.10", | ||
"@types/mapbox-gl": "2.7.13", | ||
"mapbox-gl": "3.0.0-beta.3" | ||
"@types/geojson": "7946.0.13", | ||
"@types/mapbox-gl": "2.7.19", | ||
"mapbox-gl": "3.0.1" | ||
}, | ||
@@ -13,0 +13,0 @@ "peerDependencies": { |
@@ -18,2 +18,3 @@ /** | ||
* @param {boolean=} options.disabled | ||
* @param {boolean=} options.hidden | ||
* @param {string=} options.className | ||
@@ -37,2 +38,5 @@ * @param {() => void=} options.onClick | ||
} | ||
if (options.hidden) { | ||
button.hidden = true; | ||
} | ||
if (options.className) { | ||
@@ -39,0 +43,0 @@ button.classList.add(options.className); |
@@ -7,2 +7,3 @@ export function controlContainer(className: string): HTMLDivElement; | ||
disabled?: boolean | undefined; | ||
hidden?: boolean | undefined; | ||
className?: string | undefined; | ||
@@ -9,0 +10,0 @@ onClick?: (() => void) | undefined; |
3941
123