fix(slider): handle color inside dark modal

This commit is contained in:
07akioni 2020-11-15 14:15:09 +08:00
parent 1c25938bde
commit 21e6c7bf78
3 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { cTB, c, cB, cM, cE } from '../../../_utils/cssr'
import { cTB, c, cB, cM, cE, insideModal } from '../../../_utils/cssr'
import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-up'
import { depx, pxfy } from '../../../_utils/css'
@ -10,6 +10,7 @@ export default c([
railFillColor,
railFillColorHover,
handleColor,
handleColorModal,
handleBoxShadow,
handleBoxShadowHover,
handleBoxShadowActive,
@ -177,7 +178,14 @@ export default c([
boxShadow: indicatorBoxShadow
}, [
fadeInScaleUpTransition()
])
]),
insideModal(
cTB('slider', [
cB('slider-handle', {
backgroundColor: handleColorModal
})
])
)
]
}
])

View File

@ -11,6 +11,7 @@ export default create({
railColorOverlay,
railColorHoverOverlay,
cardColor,
modalColor,
primaryColor,
popoverColor,
textColor2Overlay
@ -27,6 +28,7 @@ export default create({
railFillColor: defaultFillColor,
railFillColorHover: primaryColor,
handleColor: cardColor,
handleColorModal: modalColor,
handleBoxShadow: `inset 0 0 0 2px ${defaultFillColor}`,
handleBoxShadowHover: `inset 0 0 0 2px ${primaryColor}`,
handleBoxShadowActive: `inset 0 0 0 2px ${primaryColor}, 0 0 0 3px ${changeColor(primaryColor, { alpha: 0.2 })}`,

View File

@ -26,6 +26,7 @@ export default create({
railFillColor: primaryColor,
railFillColorHover: primaryColorHover,
handleColor: baseColor,
handleColorModal: baseColor,
handleBoxShadow: `inset 0 0 0 2px ${primaryColor}`,
handleBoxShadowHover: `inset 0 0 0 2px ${primaryColorHover}`,
handleBoxShadowActive: `inset 0 0 0 2px ${primaryColorHover}, 0 0 0 3px ${changeColor(primaryColor, { alpha: 0.2 })}`,