UNPKG

@cuvp1225/tango-mail

Version:
18 lines (17 loc) 970 B
import { __rest } from "tslib"; import { defineComponent } from '@music163/tango-boot'; import React from 'react'; import cx from 'classnames'; function StatView(_a) { var { label, number, helpText, className, style, children } = _a, props = __rest(_a, ["label", "number", "helpText", "className", "style", "children"]); return (React.createElement("div", Object.assign({}, props, { style: statStyle(style), className: cx('p-4', className) }), React.createElement("p", { className: "mb-2 text-sm font-medium text-gray-500 truncate" }, label), React.createElement("p", { className: "m-0 text-3xl font-semibold text-gray-700 truncate truncate" }, number), helpText && React.createElement("p", { className: "mt-1 text-sm font-medium text-gray-400 truncate" }, helpText))); } const statStyle = (style) => { return Object.assign({ display: 'inline-block' }, style); }; export const Stat = defineComponent(StatView, { name: 'Stat', });