UNPKG

hh-ui-components

Version:
20 lines 1.32 kB
import React from "react"; import { Button } from '../Button/Button'; export var LoadMore = function (_a) { var current = _a.current, available = _a.available, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, _c = _a.showProgress, showProgress = _c === void 0 ? true : _c; return (React.createElement("div", null, showProgress && React.createElement(React.Fragment, null, React.createElement("div", { className: "text-body-large-lg 2xl:text-body-large-2xl text-lnk" }, "Showing", " ", current, " ", "of", " ", available), React.createElement("div", { className: "w-full bg-white h-0.5 mt-10 lg:mt-10 2xl:mt-10-2xl 2xl:h-[0.139vw] overflow-hidden" }, React.createElement("div", { className: "bg-secondary h-0.5 2xl:h-[0.139vw]", style: { width: Math.round((current / available) * 100) + "%" } }))), React.createElement("div", { className: "mt-30 2xl:mt-30-2xl" }, React.createElement(Button, { label: "Load More", className: " focus:ring-0 focus:bg-graphite", onClick: onClick, disabled: disabled })))); }; //# sourceMappingURL=LoadMore.js.map