Skip to content

Commit ee44341

Browse files
committed
✨ Feat: Add zIndex prop to StyledEventScaler for improved layering
1 parent 3079fac commit ee44341

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/web/src/views/Calendar/components/Event/Grid/GridEvent/GridEvent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,14 @@ const _GridEvent = (
121121
showResizeCursor={!isPlaceholder && !isResizing && !isDragging}
122122
onMouseDown={(e) => onScalerMouseDown(event, e, "startDate")}
123123
top="-0.25px"
124+
zIndex={ZIndex.LAYER_4}
124125
/>
125126

126127
<StyledEventScaler
127128
bottom="-0.25px"
128129
showResizeCursor={!isPlaceholder && !isResizing && !isDragging}
129130
onMouseDown={(e) => onScalerMouseDown(event, e, "endDate")}
131+
zIndex={ZIndex.LAYER_4}
130132
/>
131133
</>
132134
</>

packages/web/src/views/Calendar/components/Event/styled.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export interface ScalerProps {
114114
showResizeCursor: boolean;
115115
bottom?: string;
116116
top?: string;
117+
zIndex?: number;
117118
}
118119

119120
export const StyledEventScaler = styled.div.attrs<ScalerProps>((props) => {
@@ -130,4 +131,5 @@ export const StyledEventScaler = styled.div.attrs<ScalerProps>((props) => {
130131
top: ${(props) => props.top};
131132
bottom: ${(props) => props.bottom};
132133
${(props) => props.showResizeCursor && `cursor: row-resize`};
134+
${({ zIndex }) => zIndex && `z-index: ${zIndex}`}
133135
`;

0 commit comments

Comments
 (0)