@fluentui/react-northstar
Version:
A themable React component library.
36 lines (35 loc) • 1.21 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["active", "indent", "actionable", "children", "style", "badge"];
import * as React from 'react';
export var DebugLine = function DebugLine(_ref) {
var active = _ref.active,
_ref$indent = _ref.indent,
indent = _ref$indent === void 0 ? 0 : _ref$indent,
actionable = _ref.actionable,
children = _ref.children,
style = _ref.style,
badge = _ref.badge,
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement("a", _extends({
style: Object.assign({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
paddingLeft: indent * 2 + "ch",
outline: 0
}, actionable && {
color: 'cornflowerblue',
cursor: 'pointer'
}, active && {
background: 'rgba(255, 255, 255, 0.1)'
}, style)
}, rest), children, badge && /*#__PURE__*/React.createElement("span", {
style: {
padding: '0 4px',
fontSize: 10,
opacity: 0.75
}
}, badge));
};
//# sourceMappingURL=DebugLine.js.map