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.
20 lines
593 B
JavaScript
20 lines
593 B
JavaScript
"use strict";
|
|
|
|
const React = require("react");
|
|
|
|
const useTheme = require("../../util/themeable");
|
|
const defaultStyle = require("./style.css");
|
|
const generateGridItemStyle = require("../../util/generate-grid-item-style");
|
|
|
|
module.exports = function StatusIndicator({ x, y, status, children }) {
|
|
let { withTheme } = useTheme({ control: "statusIndicator", defaultStyle });
|
|
|
|
return (
|
|
<div className={withTheme("uilibComponent", "statusIndicator", `status-${status}`)} style={generateGridItemStyle({ x, y })}>
|
|
<div className={withTheme("content")}>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|