Skip to content

Commit

Permalink
Add getImageSourceSync to multi-style icon sets (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
mucahittekin committed Oct 26, 2023
1 parent f4e1c1e commit 856dfd9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/create-multi-style-icon-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ export default function createMultiStyleIconSet(styles, optionsInput = {}) {
return getStyledIconSet(style, name).getImageSource(name, size, color);
}

function getImageSourceSync(
name,
size = DEFAULT_ICON_SIZE,
color = DEFAULT_ICON_COLOR,
style = options.defaultStyle
) {
return getStyledIconSet(style, name).getImageSourceSync(name, size, color);
}

function getFontFamily(style = options.defaultStyle) {
return getStyledIconSet(style).getFontFamily();
}
Expand Down Expand Up @@ -131,6 +140,7 @@ export default function createMultiStyleIconSet(styles, optionsInput = {}) {
Icon.Button = createStyledIconClass('Button');
Icon.getStyledIconSet = getStyledIconSet;
Icon.getImageSource = getImageSource;
Icon.getImageSourceSync = getImageSourceSync;
Icon.getFontFamily = getFontFamily;
Icon.getRawGlyphMap = getRawGlyphMap;
Icon.hasIcon = hasIcon;
Expand Down

0 comments on commit 856dfd9

Please sign in to comment.