@tdb/web
Version:
Common condiguration for serving a web-site and testing web-based UI components.
39 lines • 1.43 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var common_1 = require("../../common");
exports.Image = function (props) {
var url = props.url, width = props.width, title = props.title;
var styles = {
base: common_1.css({
display: 'inline-block',
boxSizing: 'border-box',
background: common_1.color.format(-0.03),
marginTop: 10,
padding: 8,
paddingBottom: 5,
borderRadius: 5,
marginRight: 10,
}),
labelOuter: common_1.css({
boxSizing: 'border-box',
width: width,
PaddingX: 5,
paddingBottom: 5,
Flex: 'horizontal-spaceBetween',
}),
img: common_1.css({
width: width,
borderRadius: 5,
}),
text: common_1.css({
fontSize: 11,
}),
};
return (common_1.React.createElement("div", tslib_1.__assign({}, styles.base),
common_1.React.createElement("div", tslib_1.__assign({}, styles.labelOuter),
common_1.React.createElement("div", tslib_1.__assign({}, styles.text), title),
common_1.React.createElement("div", tslib_1.__assign({}, styles.text), url)),
common_1.React.createElement("img", tslib_1.__assign({ src: url }, styles.img))));
};
//# sourceMappingURL=Image.js.map