UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: русификация и редизайн аналитики внутреннего контура
This commit is contained in:
@@ -36,6 +36,7 @@ interface TBarProps extends TShapeProps {
|
||||
showPercentage?: boolean;
|
||||
showTopBorderRadius?: boolean;
|
||||
showBottomBorderRadius?: boolean;
|
||||
borderRadius?: number;
|
||||
dotted?: boolean;
|
||||
}
|
||||
|
||||
@@ -95,6 +96,7 @@ const CustomBar = React.memo(function CustomBar(props: TBarProps) {
|
||||
showPercentage,
|
||||
showTopBorderRadius,
|
||||
showBottomBorderRadius,
|
||||
borderRadius,
|
||||
} = props;
|
||||
|
||||
if (!height) return null;
|
||||
@@ -109,8 +111,8 @@ const CustomBar = React.memo(function CustomBar(props: TBarProps) {
|
||||
currentBarPercentage !== undefined &&
|
||||
!Number.isNaN(currentBarPercentage);
|
||||
|
||||
const topBorderRadius = showTopBorderRadius ? BAR_TOP_BORDER_RADIUS : 0;
|
||||
const bottomBorderRadius = showBottomBorderRadius ? BAR_BOTTOM_BORDER_RADIUS : 0;
|
||||
const topBorderRadius = showTopBorderRadius ? (borderRadius ?? BAR_TOP_BORDER_RADIUS) : 0;
|
||||
const bottomBorderRadius = showBottomBorderRadius ? (borderRadius ?? BAR_BOTTOM_BORDER_RADIUS) : 0;
|
||||
|
||||
return (
|
||||
<g>
|
||||
@@ -177,6 +179,7 @@ const createShapeVariant =
|
||||
showPercentage={bar.showPercentage}
|
||||
showTopBorderRadius={!!showTopBorderRadius}
|
||||
showBottomBorderRadius={!!showBottomBorderRadius}
|
||||
borderRadius={bar.borderRadius}
|
||||
{...factoryProps}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user