mirror of
https://ghproxy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-07-22 12:27:13 +08:00
* update: change chart components to mui * refactor: tooltip, chart data, rendering logic * refactor: improved organization and reduce duplicated code * update: colors with variables * fix: width of the pie chart * fix: pie chart width * udpate: simply pie chart value calculation
28 lines
780 B
JavaScript
28 lines
780 B
JavaScript
import Typography from '@elementor/ui/Typography';
|
|
import ValueLoader from '@ea11y/pages/assistant/loaders/value-loader';
|
|
import AccessibilityAssistantTooltip from '@ea11y/pages/assistant/tooltip';
|
|
import {
|
|
StyledStatsItem,
|
|
StyledStatsItemContent,
|
|
StyledStatsItemTitle,
|
|
} from './stats.styles';
|
|
|
|
const StatsCounter = ({ stat, loading, title, tooltip }) => {
|
|
return (
|
|
<StyledStatsItem className="scanned-urls">
|
|
<StyledStatsItemContent>
|
|
<StyledStatsItemTitle variant="subtitle1" as="p">
|
|
{title}
|
|
|
|
<AccessibilityAssistantTooltip content={tooltip} />
|
|
</StyledStatsItemTitle>
|
|
|
|
<Typography variant="h4" as="p">
|
|
{loading ? <ValueLoader /> : stat}
|
|
</Typography>
|
|
</StyledStatsItemContent>
|
|
</StyledStatsItem>
|
|
);
|
|
};
|
|
|
|
export default StatsCounter;
|