You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
511 B
JavaScript
17 lines
511 B
JavaScript
'use strict';
|
|
|
|
const React = require("react");
|
|
|
|
const defaultStyle = require("./style.css");
|
|
const useTheme = require("../../util/themeable");
|
|
|
|
module.exports = function Icon({ icon }) {
|
|
// FIXME: Figure out a better way to test stuff than symlinking ui-lib react into site-builder react...
|
|
let { withTheme } = useTheme({ control: "icon", defaultStyle });
|
|
|
|
// FIXME: Don't hardcode icon base path, get it from theme
|
|
return (
|
|
<img className={withTheme("icon")} src={`/images/icons/${icon}.svg`} />
|
|
);
|
|
};
|