Skip to content

Commit

Permalink
fix: custom className & style not working (#3089)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Sep 9, 2024
1 parent 44e4941 commit 8a88350
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/statistic/Statistic.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
import classNames from 'classnames';
import isNumber from 'lodash/isNumber';
import isFunction from 'lodash/isFunction';
import {
Expand All @@ -25,6 +26,8 @@ export interface StatisticRef {

const Statistic = forwardRef<StatisticRef, StatisticProps>((props, ref) => {
const {
className,
style,
animation,
animationStart,
color,
Expand Down Expand Up @@ -139,7 +142,7 @@ const Statistic = forwardRef<StatisticRef, StatisticProps>((props, ref) => {
const suffixRender = suffix || (trendIcon && trendPlacement === 'right' ? trendIcon : null);

return (
<div className={`${classPrefix}-statistic`}>
<div className={classNames(`${classPrefix}-statistic`, className)} style={style}>
{title && <div className={`${classPrefix}-statistic-title`}>{title}</div>}
<Skeleton animation="gradient" theme="text" loading={!!loading}>
<div className={`${classPrefix}-statistic-content`} style={valueStyle}>
Expand Down

0 comments on commit 8a88350

Please sign in to comment.