Skip to content

Commit

Permalink
[TM-1392] edit toolgle in secDashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
dottyy committed Nov 29, 2024
1 parent 7d84b3c commit ea12eee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/elements/Toggle/Toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Toggle = (props: ToggleProps) => {
transform: `translateX(calc(${buttonRefs.current[activeIndex]?.offsetLeft || 0}px - 4px))`
}}
/>
{items.map((tab, index) => (
{items.map((tab: TogglePropsItem, index) => (
<button
key={tab.key}
ref={el => (buttonRefs.current[index] = el)}
Expand Down
10 changes: 8 additions & 2 deletions src/pages/dashboard/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ const Dashboard = () => {
isUserAllowed
} = useDashboardData(filters);

const dataToggle = ["Absolute", "Relative"];
const dataToggleGraphic = ["Table", "Graph"];
const dataToggle = [
{ tooltip: { key: "Absolute", render: "Absolute" } },
{ tooltip: { key: "Relative", render: "Relative" } }
];
const dataToggleGraphic = [
{ tooltip: { key: "Table", render: "Table" } },
{ tooltip: { key: "Graph", render: "Graph" } }
];

useEffect(() => {
refetchTotalSectionHeader();
Expand Down
6 changes: 3 additions & 3 deletions src/pages/dashboard/mockedData/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export const LABEL_LEGEND = [
{
label: "Total",
tooltip: { key: "Total", render: "Total" },
color: "bg-blueCustom-900"
},
{
label: "Non-Profit",
tooltip: { key: "Non-Profit", render: "Non-Profit" },
color: "bg-secondary-600"
},
{
label: "Enterprise",
tooltip: { key: "Enterprise", render: "Enterprise" },
color: "bg-primary"
}
];
Expand Down

0 comments on commit ea12eee

Please sign in to comment.