Repository URL to install this package:
|
Version:
4.0.59 ▾
|
@skava/ui
/
dist
/
components
/
atoms
/
Placeholder
/
RectanglePlaceholder
/
RectanglePlaceholder.js
|
|---|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const Vector_1 = tslib_1.__importDefault(require("../../Vector"));
const deps_1 = require("../deps");
class RectanglePlaceholder extends react_1.default.PureComponent {
render() {
let _a = this.props,
{
fill,
width,
height,
style,
viewBox
} = _a,
remainingProps = tslib_1.__rest(_a, ["fill", "width", "height", "style", "viewBox"]); // width = '100%'
height = deps_1.stripMeasurement(height);
viewBox = `0 0 ${width} ${height}`;
const attributes = Object.assign({
width,
height,
viewBox
}, remainingProps);
return react_1.default.createElement(Vector_1.default, Object.assign({}, attributes), react_1.default.createElement("rect", {
style: style,
width: width,
height: height,
d: "M0 0h600v24H0z",
fill: fill,
fillRule: "evenodd"
}));
}
}
RectanglePlaceholder.defaultProps = {
fill: '#D8D8D8',
width: '100%',
height: '65',
viewBox: '0 0 100% 65',
isDynamicViewBox: true
};
exports.RectanglePlaceholder = RectanglePlaceholder;
exports.default = RectanglePlaceholder; //# sourceMappingURL=RectanglePlaceholder.js.map