All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.components.OverviewMetric.tsx Maven / Gradle / Ivy

/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import {Text} from '@clayui/core';
import {ColorType} from '@clayui/core/lib/typography/Text';
import ClayIcon from '@clayui/icon';
import classNames from 'classnames';
import React from 'react';

import {getPercentage, toThousands} from '../utils/math';

export enum TrendClassification {
	Negative = 'NEGATIVE',
	Neutral = 'NEUTRAL',
	Positive = 'POSITIVE',
}

type Classification = {
	[key in TrendClassification]: ColorType;
};

const classification: Classification = {
	[TrendClassification.Negative]: 'danger',
	[TrendClassification.Neutral]: 'secondary',
	[TrendClassification.Positive]: 'success',
};

interface IOverviewMetricProps {
	name: string;
	onSelectMetric: () => void;
	selected?: boolean;
	trend: {
		percentage: number;
		trendClassification: TrendClassification;
	};
	value: number;
}

const OverviewMetric: React.FC = ({
	name,
	onSelectMetric,
	selected,
	trend,
	value,
}) => {
	return (
		
	);
};

export default OverviewMetric;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy