From 296c7d22ac7b40d9bc31942d7cc63f37b0cc3878 Mon Sep 17 00:00:00 2001 From: Mustafa Saifee Date: Mon, 10 Jun 2024 20:10:07 +0300 Subject: [PATCH] Fix layput issue for small screens --- src/BarChart/index.tsx | 36 ++++++++++++++++---------------- src/DebtInterestBars/index.tsx | 33 +++++++++++++++-------------- src/QuantilesLineChart/index.tsx | 33 +++++++++++++++-------------- src/StackedBarChart/index.tsx | 33 +++++++++++++++-------------- 4 files changed, 69 insertions(+), 66 deletions(-) diff --git a/src/BarChart/index.tsx b/src/BarChart/index.tsx index 26379f7..0b52c48 100644 --- a/src/BarChart/index.tsx +++ b/src/BarChart/index.tsx @@ -50,10 +50,27 @@ export function BarChart(props: Props) { income {domain[0]} - {domain[1]}
+ + +
+ +
+ ({ - label: d.description, - value: d.description, - }))} - className='undp-select' - style={{ width: '100%' }} - onChange={el => { - setCategorySelection(el); - }} - value={categorySelection} - /> -
d.Group === categorySelection)} totalPercentOption={totalPercentSelection} diff --git a/src/DebtInterestBars/index.tsx b/src/DebtInterestBars/index.tsx index def481a..b939523 100644 --- a/src/DebtInterestBars/index.tsx +++ b/src/DebtInterestBars/index.tsx @@ -33,28 +33,13 @@ export function DebtInterestBars(props: Props) { percent of revenue today relative to a decade ago
- { - setTotalPercentSelection(el.target.value); - }} - > - {numberPercentOptions.map((d, i) => ( - - {d} - - ))} - {divToBeDownloaded ? ( ) : null}
-
+
({ label: d.description, @@ -68,6 +53,22 @@ export function QuantilesLineChart(props: Props) { }} value={categorySelection} /> +
+ + setTotalExternalSelection(el.target.value) + } + > + {totalExternalOptions.map((d, i) => ( + + {d[0].toUpperCase() + d.slice(1)} + + ))} + +
d.Group === categorySelection)} diff --git a/src/StackedBarChart/index.tsx b/src/StackedBarChart/index.tsx index 618dde5..f4936a8 100644 --- a/src/StackedBarChart/index.tsx +++ b/src/StackedBarChart/index.tsx @@ -60,26 +60,11 @@ export function StackedBarChart(props: Props) { rating classes
- { - setCreditDsaSelection(el.target.value); - }} - > - {creditDsaOptions.map((d, i) => ( - - {d} - - ))} -
-
+