diff --git a/src/lib/icons.ts b/src/lib/icons.ts index 562675d..a28c1bf 100644 --- a/src/lib/icons.ts +++ b/src/lib/icons.ts @@ -1,6 +1,4 @@ -export type IconProvider = ( - iconId: string -) => HTMLElement | URL | string; +export type IconProvider = (iconId: string) => HTMLElement | URL | string; export enum MaterialIconsStyle { FILLED = 'filled', @@ -65,7 +63,10 @@ export function MaterialIcons( } export function PlaceIcons(): IconProvider { - return iconId => createURL(iconId); + return iconId => + new URL( + `https://maps.gstatic.com/mapfiles/place_api/icons/v2/${iconId}_pinlet.svg` + ); } /** @@ -82,12 +83,6 @@ function createSpan(className: string, content: string): HTMLElement { return el; } -function createURL(content: string) { - return new URL( - `https://maps.gstatic.com/mapfiles/place_api/icons/v2/${content}_pinlet.svg` - ); -} - /** * Checks existing google fonts link tags for the specified material-icons * font-family.