@git-temporal/git-temporal-react
Version:
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
26 lines (25 loc) • 1 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const styles_1 = require("app/styles");
const defaultContainerStyle = {
flexGrow: 0,
marginRight: 20,
marginBottom: 10,
};
exports.StackedLabel = (props) => {
const labelStyles = [props.labelStyle, 'smallerText'];
if (props.isSelected) {
labelStyles.push('selected');
}
else if (props.onLabelClick) {
labelStyles.push('selectable');
}
return (react_1.default.createElement("div", { style: defaultContainerStyle },
react_1.default.createElement("div", { style: styles_1.style(labelStyles), title: props.title, onClick: props.onLabelClick }, props.label),
react_1.default.createElement("div", null, props.children)));
};
exports.StackedLabel.displayName = 'StackedLabel';