UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

47 lines (45 loc) 6.17 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireDefault(require("react")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _templateObject, _templateObject2; // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project /** @typedef {import('./progress-bar').ProgressBarProps} ProgressBarProps */ var StyledBar = _styledComponents["default"].span.attrs({ className: 'progress-bar__bar' })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n /* transition: width 200ms; */\n display: block;\n"])), function (props) { return props.barColor || props.theme.progressBarColor; }); var StyledTrack = _styledComponents["default"].div.attrs({ className: 'progress-bar' })(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n"])), function (props) { return props.trackColor || props.theme.progressBarTrackColor; }); /** @type {React.FunctionComponent<ProgressBarProps>} */ var ProgressBar = function ProgressBar(_ref) { var percent = _ref.percent, _ref$height = _ref.height, height = _ref$height === void 0 ? 4 : _ref$height, isLoading = _ref.isLoading, barColor = _ref.barColor, trackColor = _ref.trackColor, theme = _ref.theme; return /*#__PURE__*/_react["default"].createElement(StyledTrack, { trackColor: trackColor, theme: theme }, /*#__PURE__*/_react["default"].createElement(StyledBar, { barColor: barColor, style: { width: percent, height: "".concat(height, "px"), opacity: isLoading ? 1 : 0 } })); }; var _default = exports["default"] = ProgressBar; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9zdHlsZWRDb21wb25lbnRzIiwiX3RlbXBsYXRlT2JqZWN0I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