Skip to content

Commit

Permalink
feat(Item): added popupContentClassName prop
Browse files Browse the repository at this point in the history
  • Loading branch information
sunduckcow committed Feb 2, 2024
1 parent 0a12da5 commit c794322
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -89,6 +89,9 @@ body {

opacity: 70%;
}
&__popup-content-class-name {
border-radius: 16px;
}
}

.composite-bar-showcase__tag {
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ export const AsideHeaderShowcase: React.FC<AsideHeaderShowcaseProps> = ({
popupOffset: [10, 10],
popupVisible: subheaderPopupVisible,
onClosePopup: () => setSubheaderPopupVisible(false),
popupContentClassName: b('popup-content-class-name'),
renderPopupContent: () => {
return (
<div className={b('settings')}>
4 changes: 3 additions & 1 deletion src/components/CompositeBar/Item/Item.tsx
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ interface ItemPopup {
popupPlacement?: PopupProps['placement'];
popupOffset?: PopupProps['offset'];
popupKeepMounted?: PopupProps['keepMounted'];
popupContentClassName?: PopupProps['contentClassName'];
renderPopupContent?: () => React.ReactNode;
onClosePopup?: () => void;
}
@@ -80,6 +81,7 @@ export const Item: React.FC<ItemInnerProps> = (props) => {
popupPlacement = defaultPopupPlacement,
popupOffset = defaultPopupOffset,
popupKeepMounted,
popupContentClassName,
renderPopupContent,
onClosePopup,
onItemClick,
@@ -197,7 +199,7 @@ export const Item: React.FC<ItemInnerProps> = (props) => {
</div>
{renderPopupContent && Boolean(anchorRef?.current) && (
<Popup
contentClassName={b('popup')}
contentClassName={b('popup', popupContentClassName)}
open={popupVisible}
keepMounted={popupKeepMounted}
placement={popupPlacement}

0 comments on commit c794322

Please sign in to comment.