Skip to content

Commit 4b9716b

Browse files
committed
export MarketingModal and wrap it with withStackedComponentStyles
1 parent 4ca513b commit 4b9716b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react';
2+
import {
3+
Body,
4+
MarketingModal as LeafyGreenMarketingModal,
5+
} from '../leafygreen';
6+
import { withStackedComponentStyles } from '../../hooks/use-stacked-component';
7+
8+
function MarketingModal({
9+
children,
10+
...props
11+
}: React.ComponentProps<typeof LeafyGreenMarketingModal>): React.ReactElement {
12+
return (
13+
<LeafyGreenMarketingModal {...props}>
14+
<Body as="div">{children}</Body>
15+
</LeafyGreenMarketingModal>
16+
);
17+
}
18+
19+
export default withStackedComponentStyles(MarketingModal);

packages/compass-components/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export {
1414
cache,
1515
} from '@leafygreen-ui/emotion';
1616
import ConfirmationModal from './components/modals/confirmation-modal';
17+
import MarketingModal from './components/modals/marketing-modal';
1718
import type {
1819
ElectronFileDialogOptions,
1920
ElectronShowFileDialogProvider,
@@ -131,6 +132,7 @@ export {
131132
defaultSidebarWidth,
132133
createElectronFileInputBackend,
133134
createJSDomFileInputDummyBackend,
135+
MarketingModal,
134136
};
135137
export {
136138
useFocusState,

packages/compass-generative-ai/src/components/ai-optin-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
css,
88
spacing,
99
palette,
10-
MarketingModal,
1110
Theme,
1211
useDarkMode,
12+
MarketingModal,
1313
} from '@mongodb-js/compass-components';
1414
import { AiImageBanner } from './ai-image-banner';
1515
import { closeOptInModal, optIn } from '../store/atlas-optin-reducer';

0 commit comments

Comments
 (0)