From 773790c02cdfdf9ea94defeedad7b9a3289c88a0 Mon Sep 17 00:00:00 2001 From: v3gaaa Date: Thu, 22 Aug 2024 13:15:32 -0600 Subject: [PATCH] Reordenamiento sample --- samples/utils/BarChartControls.tsx | 217 ++++++++++------------------- samples/utils/BarChartWrapper.tsx | 88 ++++++------ samples/utils/NavBar.tsx | 36 +++-- 3 files changed, 144 insertions(+), 197 deletions(-) diff --git a/samples/utils/BarChartControls.tsx b/samples/utils/BarChartControls.tsx index d25db08..9cdc0fe 100644 --- a/samples/utils/BarChartControls.tsx +++ b/samples/utils/BarChartControls.tsx @@ -55,164 +55,95 @@ const BarChartControls: React.FC = ({ }; return ( -
-
- -
-
- -
-
-
); }; diff --git a/samples/utils/BarChartWrapper.tsx b/samples/utils/BarChartWrapper.tsx index 524e922..17078ef 100644 --- a/samples/utils/BarChartWrapper.tsx +++ b/samples/utils/BarChartWrapper.tsx @@ -21,49 +21,53 @@ const BarChartWrapper: React.FC = ({ data, children }) => const [showLegend, setShowLegend] = useState(true); return ( -
- - - {showCartesianGrid && } - {showXAxis && } - {showYAxis && } - {showTooltip && } - {showLegend && } - {children} - +
+
+ +
+
+ + {showCartesianGrid && } + {showXAxis && } + {showYAxis && } + {showTooltip && } + {showLegend && } + {children} + +
); }; -export default BarChartWrapper; +export default BarChartWrapper; \ No newline at end of file diff --git a/samples/utils/NavBar.tsx b/samples/utils/NavBar.tsx index f75907a..52547b0 100644 --- a/samples/utils/NavBar.tsx +++ b/samples/utils/NavBar.tsx @@ -1,19 +1,31 @@ import React from 'react'; -import { Link } from 'react-router-dom'; +import { Link, useLocation } from 'react-router-dom'; const NavBar = () => { + const location = useLocation(); + + const navItems = [ + { name: 'Normal BarChart', path: '/' }, + { name: 'Stacked BarChart', path: '/stacked' }, + { name: 'Ranged BarChart', path: '/ranged' }, + ]; + return ( -