Summary
Allow consumers of @acrool/react-picker to override the mask background using a CSS custom property, without relying on fragile CSS Module class selectors or extra React props.
Context
The mask is rendered by the shared .motion-mask-wrapper class in both MotionDrawer and MotionDrawerWithout. The background was previously hard-coded to rgba(0, 0, 0, 0.2). IPickerOption.motionProps only applies to the main panel, not the mask.
Implementation
In motion-drawer.module.scss, set the mask background to:
background: var(--acrool-react-picker-mask-background, rgba(0, 0, 0, 0.2));
Summary
Allow consumers of
@acrool/react-pickerto override the mask background using a CSS custom property, without relying on fragile CSS Module class selectors or extra React props.Context
The mask is rendered by the shared
.motion-mask-wrapperclass in bothMotionDrawerandMotionDrawerWithout. The background was previously hard-coded torgba(0, 0, 0, 0.2).IPickerOption.motionPropsonly applies to the main panel, not the mask.Implementation
In
motion-drawer.module.scss, set the maskbackgroundto: