add a flex basis prop instead of one-off fix
This commit is contained in:
1 parent
96b2266a9d
commit
5343241036
3 files changed
+7
-8
No files matched your search
@@ -12,6 +12,7 @@ type BaseChartProps = React.PropsWithChildren<{
|
||||
title: string;
|
||||
width?: number | string;
|
||||
maxWidth?: number | string;
|
||||
flexBasis?: number | string;
|
||||
padding?: number | string | ResponsiveStyleValue<number | string>;
|
||||
onClick?: () => void;
|
||||
}>;
|
||||
@@ -21,6 +22,7 @@ export const BaseChart = ({
|
||||
title,
|
||||
width = "100%",
|
||||
maxWidth = "100%",
|
||||
flexBasis = "0%",
|
||||
padding,
|
||||
onClick,
|
||||
}: BaseChartProps) => {
|
||||
@@ -32,6 +34,7 @@ export const BaseChart = ({
|
||||
padding: padding ?? theme.spacing(LAYOUT.MD),
|
||||
display: "flex",
|
||||
flex: 1,
|
||||
flexBasis,
|
||||
width: width,
|
||||
maxWidth: maxWidth,
|
||||
...(onClick && {
|
||||
|
||||
Reference in new issue
Block a user