mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +00:00
SPRINT-18: minor style change on inputs for padding, updated for statistics titles to come from widget meta data
This commit is contained in:
@ -271,7 +271,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
|
|||||||
widgetMetaData.type === "simpleStatistics" && (
|
widgetMetaData.type === "simpleStatistics" && (
|
||||||
widgetData && widgetData[i] && (
|
widgetData && widgetData[i] && (
|
||||||
<SimpleStatisticsCard
|
<SimpleStatisticsCard
|
||||||
title={widgetData[i]?.title}
|
title={widgetMetaData.label}
|
||||||
data={widgetData[i]}
|
data={widgetData[i]}
|
||||||
increaseIsGood={widgetData[i].increaseIsGood}
|
increaseIsGood={widgetData[i].increaseIsGood}
|
||||||
isCurrency={widgetData[i].isCurrency}
|
isCurrency={widgetData[i].isCurrency}
|
||||||
@ -283,6 +283,7 @@ function DashboardWidgets({widgetMetaDataList, tableName, entityPrimaryKey, omit
|
|||||||
widgetMetaData.type === "statistics" && (
|
widgetMetaData.type === "statistics" && (
|
||||||
widgetData && widgetData[i] && (
|
widgetData && widgetData[i] && (
|
||||||
<StatisticsCard
|
<StatisticsCard
|
||||||
|
title={widgetMetaData.label}
|
||||||
color={colors.info.main}
|
color={colors.info.main}
|
||||||
icon={widgetMetaData.icon}
|
icon={widgetMetaData.icon}
|
||||||
data={widgetData[i]}
|
data={widgetData[i]}
|
||||||
|
@ -42,6 +42,7 @@ export interface StatisticsCardData
|
|||||||
/////////////////////////
|
/////////////////////////
|
||||||
interface Props
|
interface Props
|
||||||
{
|
{
|
||||||
|
title: string
|
||||||
data: StatisticsCardData;
|
data: StatisticsCardData;
|
||||||
color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "light" | "dark";
|
color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "light" | "dark";
|
||||||
icon: ReactNode;
|
icon: ReactNode;
|
||||||
@ -60,9 +61,9 @@ StatisticsCard.defaultProps = {
|
|||||||
increaseIsGood: true
|
increaseIsGood: true
|
||||||
};
|
};
|
||||||
|
|
||||||
function StatisticsCard({data, color, icon, increaseIsGood}: Props): JSX.Element
|
function StatisticsCard({title, data, color, icon, increaseIsGood}: Props): JSX.Element
|
||||||
{
|
{
|
||||||
const {title, count, percentageAmount, percentageLabel} = data;
|
const {count, percentageAmount, percentageLabel} = data;
|
||||||
|
|
||||||
let percentageString = "";
|
let percentageString = "";
|
||||||
if (percentageAmount)
|
if (percentageAmount)
|
||||||
|
@ -105,6 +105,18 @@
|
|||||||
font-size: .875rem !important;
|
font-size: .875rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.MuiInput-input, .MuiInputLabel-root
|
||||||
|
{
|
||||||
|
padding-left: 8px !important;
|
||||||
|
padding-right: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.MuiInputLabel-shrink
|
||||||
|
{
|
||||||
|
padding-top: 2px !important;
|
||||||
|
padding-left: 2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.MuiDataGrid-toolbarContainer .selectionTool
|
.MuiDataGrid-toolbarContainer .selectionTool
|
||||||
{
|
{
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
|
Reference in New Issue
Block a user