Skip to content

Commit

Permalink
chore: center-popup use classPrefix (#6305)
Browse files Browse the repository at this point in the history
  • Loading branch information
1587315093 authored Aug 14, 2023
1 parent e1fd659 commit 384373e
Showing 1 changed file with 7 additions and 5 deletions.
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

0 comments on commit 384373e

Please sign in to comment.