@progress/kendo-charts 1.29.0 → 1.30.0-dev.202307190651

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,8 @@ import {
3
3
  addClass,
4
4
  keys,
5
5
  hasClasses,
6
- setDefaultOptions
6
+ setDefaultOptions,
7
+ renderIcon
7
8
  } from '../common';
8
9
 
9
10
  import {
@@ -17,12 +18,12 @@ import {
17
18
  convertToHtml
18
19
  } from './utils';
19
20
 
20
- function createButton(direction, iconClass) {
21
+ function createButton(direction, icon, iconOptions) {
21
22
  const html =
22
23
  '<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-' + direction +
23
24
  '" title="zoom-' + direction +
24
25
  '" aria-label="zoom-' + direction + '">' +
25
- '<span class="k-icon ' + iconClass + '">' + '</span>' +
26
+ renderIcon({ icon: icon, iconClass: "k-button-icon", svgIcons: iconOptions.svgIcons, type: iconOptions.type }) +
26
27
  '</button>';
27
28
 
28
29
  return convertToHtml(html);
@@ -35,13 +36,13 @@ let FF_MINUS = 173;
35
36
  const CHANGE = "change";
36
37
 
37
38
  export class ZoomControl extends Observable {
38
- constructor(element, options) {
39
+ constructor(element, options, iconOptions) {
39
40
  super();
40
41
  this.element = element;
41
42
  this._initOptions(options);
42
43
 
43
- const zoomInButton = createButton('in', 'k-i-plus');
44
- const zoomOutButton = createButton('out', 'k-i-minus');
44
+ const zoomInButton = createButton('in', 'plus', iconOptions);
45
+ const zoomOutButton = createButton('out', 'minus', iconOptions);
45
46
 
46
47
  this.element.appendChild(zoomInButton);
47
48
  this.element.appendChild(zoomOutButton);