wix-style-react
Version:
wix-style-react
46 lines • 2.54 kB
TypeScript
export default StatisticsWidget;
declare class StatisticsWidget extends React.PureComponent<any, any, any> {
static displayName: string;
static defaultProps: {
size: string;
};
static propTypes: {
/** Applied as data-hook HTML attribute that can be used to create driver in testing */
dataHook: PropTypes.Requireable<string>;
/** Displayed value size (default: large) */
size: PropTypes.Requireable<string>;
/** Alignment of inner items (default: center) */
alignItems: PropTypes.Requireable<string>;
/** Show loader instead of values for all statistic items (default: undefined) */
isLoading: PropTypes.Requireable<boolean>;
/**
* Array of statistic items
* * `value` - Value of the statistic. Displayed as big text in the first row.
* * `valueInShort` - Short version of value. Will be applied when there is no space for long value. If not specified, part of the value will be hidden with ellipsis
* * `description` - Description of the statistic. Displayed in the second row.
* * `descriptionInfo` - More info about the description. Displayed as an info icon with this text inside a tooltip
* * `percentage` - Change in percents. Positive number - arrow up, negative - arrow down.
* * `invertedPercentage` - When set to true renders positive percentage in red and negative in green.
* * `onClick` - Callback to be executed on click (also on Enter/Space key press)
* * `isLoading` - Shows a loader instead of value.
* * `children` - Node to render on bottom of section.
*/
items: PropTypes.Requireable<(PropTypes.InferProps<{
value: PropTypes.Requireable<string>;
valueInShort: PropTypes.Requireable<string>;
description: PropTypes.Requireable<string>;
descriptionInfo: PropTypes.Requireable<string>;
percentage: PropTypes.Requireable<number>;
invertedPercentage: PropTypes.Requireable<boolean>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
}> | null | undefined)[]>;
};
constructor(props: any);
constructor(props: any, context: any);
_renderStat: (stat: any, key: any) => React.JSX.Element;
render(): React.JSX.Element;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=StatisticsWidget.d.ts.map