Skip to content

Commit

Permalink
chore: round barrier corners
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv committed Nov 5, 2024
1 parent 01ab016 commit 2127135
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion chart_app/lib/deriv_chart_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ class DerivChartWrapperState extends State<DerivChartWrapper> {
style: HorizontalBarrierStyle(
color: latestTickColor,
hasArrow: false,
labelHeight: 26,
textStyle: TextStyle(
fontSize: 12,
height: 1.8,
Expand Down
1 change: 1 addition & 0 deletions sass/components/_barrier.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
right: -1px;
background-color: $color-blue;
justify-content: space-between;
border-radius: 4px;

.arrow-icon {
height: 41px;
Expand Down
10 changes: 9 additions & 1 deletion src/components/PriceLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ const PriceLine = ({
width: isOverlappingWithPriceLine ? overlappedBarrierWidth : width,
opacity,
right: price_right_offset,
borderTopRightRadius: isOverlappingWithPriceLine ? 0 : 4,
borderBottomRightRadius: isOverlappingWithPriceLine ? 0 : 4,
}}
>
<HamburgerDragIcon />
Expand All @@ -117,7 +119,13 @@ const PriceLine = ({
{isOverlappingWithPriceLine && (
<div
className='price-overlay'
style={{ backgroundColor: color, width: width - overlappedBarrierWidth + 6, right: isMobile ? 20 : 3 }}
style={{
backgroundColor: color,
width: width - overlappedBarrierWidth + 6,
right: isMobile ? 20 : 3,
borderTopRightRadius: isOverlappingWithPriceLine ? 4 : 0,
borderBottomRightRadius: isOverlappingWithPriceLine ? 4 : 0,
}}
/>
)}
</div>
Expand Down

0 comments on commit 2127135

Please sign in to comment.