Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: center-popup use classPrefix #6305

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/components/center-popup/center-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {
PopupBaseProps,
} from '../popup/popup-base-props'

const classPrefix = 'adm-center-popup'

export type CenterPopupProps = PopupBaseProps &
PropsWithChildren<{
// These props currently are only used internally. They are not exported to users:
Expand Down Expand Up @@ -72,7 +74,7 @@ export const CenterPopup: FC<CenterPopupProps> = p => {

const body = (
<div
className={classNames('adm-center-popup-body', props.bodyClassName)}
className={classNames(`${classPrefix}-body`, props.bodyClassName)}
style={props.bodyStyle}
>
{props.children}
Expand All @@ -84,7 +86,7 @@ export const CenterPopup: FC<CenterPopupProps> = p => {
withNativeProps(
props,
<div
className='adm-center-popup'
className={classPrefix}
style={{
display: active ? undefined : 'none',
pointerEvents: active ? undefined : 'none',
Expand All @@ -102,21 +104,21 @@ export const CenterPopup: FC<CenterPopupProps> = p => {
}
}}
style={props.maskStyle}
className={classNames('adm-center-popup-mask', props.maskClassName)}
className={classNames(`${classPrefix}-mask`, props.maskClassName)}
disableBodyScroll={false}
stopPropagation={props.stopPropagation}
/>
)}
<div
className='adm-center-popup-wrap'
className={`${classPrefix}-wrap`}
role={props.role}
aria-label={props['aria-label']}
>
<animated.div style={style} ref={ref}>
{props.showCloseButton && (
<a
className={classNames(
'adm-center-popup-close',
`${classPrefix}-close`,
'adm-plain-anchor'
)}
onClick={() => {
Expand Down
Loading