Skip to content

Commit eb7b434

Browse files
fix(PDYE-1146): calendario, centrar flecha (#700)
1 parent f4b9604 commit eb7b434

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

src/organisms/Calendar/Dropdown/CalendarDropdown/CalendarDropdownContainer.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,19 @@ export const CalendarDropdownContainer = ({
8080
sx={{
8181
// Pseudo-elemento para la flecha
8282
'&::after': {
83-
content: '""',
84-
position: 'absolute',
85-
width: '0',
86-
height: '0',
87-
borderColor: `transparent transparent ${vars('colors-neutral-davysGrey') ?? '#5C5C5C'}
88-
transparent`,
83+
borderColor: `transparent transparent ${
84+
vars('colors-neutral-davysGrey') ?? '#5C5C5C'
85+
} transparent`,
8986
borderStyle: 'solid',
9087
borderWidth: '0 11px 10px 11px',
91-
top: isMobile ? '30px' : '30px',
92-
right: isMobile ? '3px' : '15px',
88+
content: '""',
9389
display: isMenuOpen ? 'block' : 'none',
94-
transform: isMobile ? 'none' : 'translateX(50%)',
90+
height: '0',
91+
left: '50%',
92+
position: 'absolute',
93+
top: '30px',
94+
transform: 'translateX(-50%)',
95+
width: '0',
9596
},
9697
// Se genera pseudo elemento que actúa como ícono de notificación
9798
'&.hasNew::before': {
@@ -107,28 +108,28 @@ export const CalendarDropdownContainer = ({
107108
zIndex: '1',
108109
},
109110
'>div': {
110-
position: isMobile ? 'fixed !important' : 'absolute',
111111
left: isMobile ? '0 !important' : 'auto',
112+
position: isMobile ? 'fixed !important' : 'absolute',
112113
top: isMobile ? '62px !important' : 'auto',
113114
transform: isMobile ? 'none !important' : 'translate3d(-409px, 38px, 0px) !important',
114115
},
115116

116117
'.chakra-menu__menu-list': {
117-
padding: '0',
118-
position: 'absolute',
119-
left: isMobile ? 'auto' : '-30px',
120-
top: isMobile ? '-6px !important' : 'auto',
121-
width: isMobile ? '100vw' : '500px',
122-
maxHeight: isMobile ? 'calc(100vh - 62px)' : 'auto',
123-
overflowY: isMobile ? 'auto' : 'hidden',
118+
animation: 'none !important',
124119
background: 'transparent',
125120
border: 'none',
126121
borderRadius: isMobile ? '0' : '10px',
127122
boxShadow: isMobile ? 'none' : 'rgba(47, 47, 47, 0.2) -1px 6px 40px 0px',
128-
animation: 'none !important',
129-
transition: 'none !important',
130-
transform: 'none !important',
123+
left: isMobile ? 'auto' : '-30px',
124+
maxHeight: isMobile ? 'calc(100vh - 62px)' : 'auto',
131125
opacity: '1 !important',
126+
overflowY: isMobile ? 'auto' : 'hidden',
127+
padding: '0',
128+
position: 'absolute',
129+
top: isMobile ? '-6px !important' : 'auto',
130+
transform: 'none !important',
131+
transition: 'none !important',
132+
width: isMobile ? '100vw' : '500px',
132133
},
133134
'.chakra-menu__group__title': {
134135
fontSize: '18px',

0 commit comments

Comments
 (0)