Fix footer shadow in EditPartyModal
This commit is contained in:
parent
fa0720a549
commit
c7311a4e03
3 changed files with 11 additions and 8 deletions
|
|
@ -11,6 +11,7 @@
|
|||
justify-content: space-between;
|
||||
padding: ($unit * 1.5) ($unit * $multiplier) $unit-3x;
|
||||
position: sticky;
|
||||
transition: box-shadow 0.1s ease-out, border-top 0.1s ease-out;
|
||||
|
||||
.left,
|
||||
.right {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
gap: $unit-2x;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
|
|
|
|||
|
|
@ -246,16 +246,21 @@ const EditPartyModal = ({
|
|||
|
||||
const calculateFooterShadow = debounce(() => {
|
||||
const boxShadowBase = '0 -2px 8px'
|
||||
const scrollable = document.querySelector(`.${styles.scrollValue}`)
|
||||
const scrollable = document.querySelector(`.${styles.scrollable}`)
|
||||
const footer = footerRef
|
||||
|
||||
if (footer && footer.current) {
|
||||
if (scrollable && scrollable.clientHeight >= scrollable.scrollHeight) {
|
||||
if (scrollable) {
|
||||
if (scrollable.clientHeight >= scrollable.scrollHeight) {
|
||||
footer.current.style.boxShadow = `${boxShadowBase} rgba(0, 0, 0, 0)`
|
||||
footer.current.style.borderTopColor = `rgba(0, 0, 0, 0)`
|
||||
} else {
|
||||
footer.current.style.boxShadow = `${boxShadowBase} rgba(0, 0, 0, 0.16)`
|
||||
footer.current.style.borderTopColor = `rgba(0, 0, 0, 0.24)`
|
||||
}
|
||||
} else {
|
||||
footer.current.style.boxShadow = `${boxShadowBase} rgba(0, 0, 0, 0)`
|
||||
footer.current.style.borderTopColor = `rgba(0, 0, 0, 0)`
|
||||
} else {
|
||||
footer.current.style.boxShadow = `${boxShadowBase} rgba(0, 0, 0, 0.16)`
|
||||
footer.current.style.borderTopColor = `rgba(0, 0, 0, 0.24)`
|
||||
}
|
||||
}
|
||||
}, 100)
|
||||
|
|
@ -566,8 +571,6 @@ const EditPartyModal = ({
|
|||
<DialogTrigger asChild>{props.children}</DialogTrigger>
|
||||
<DialogContent
|
||||
className="editParty"
|
||||
headerref={topContainerRef}
|
||||
footerref={footerRef}
|
||||
onEscapeKeyDown={onEscapeKeyDown}
|
||||
onOpenAutoFocus={onOpenAutoFocus}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue