Skip to content

Commit

Permalink
[docs-infra] Fix display when ad-block triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 26, 2024
1 parent fdd856d commit 6917883
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/mui-docs/src/Ad/Ad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function PleaseDisableAdblock() {
}

const disableAd =
process.env.NODE_ENV !== 'production' && process.env.ENABLE_AD_IN_DEV_MODE !== 'true';
process.env.NODE_ENV !== 'production' && process.env.ENABLE_AD_IN_DEV_MODE === 'true';
const inHouseAds = [
{
name: 'scaffoldhub',
Expand Down Expand Up @@ -232,7 +232,6 @@ export function Ad() {
data-ga-event-category="ad"
data-ga-event-action="click"
data-ga-event-label={eventLabel}
className="Ad-root"
>
<AdErrorBoundary eventLabel={eventLabel}>{children}</AdErrorBoundary>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import W3CIcon from '../svgIcons/W3CIcon';
import MaterialDesignIcon from '../svgIcons/MaterialDesignIcon';
import { useTranslate } from '../i18n';

const Root = styled('ul')({
const Root = styled('ul')(({ theme }) => ({
margin: 0,
marginTop: theme.spacing(3),
padding: 0,
listStyle: 'none',
display: 'flex',
Expand All @@ -30,7 +31,7 @@ const Root = styled('ul')({
fontSize: 14,
},
},
});
}));

const defaultPackageNames: Record<string, string | undefined> = {
'material-ui': '@mui/material',
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-docs/src/MarkdownElement/MarkdownElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const Root = styled('div')(
// Allows to remove link arrows for images
display: 'none',
},
'& .Ad-root a::after': {
'& .ad.description a::after': {
// Remove link arrow for ads
display: 'none',
},
Expand Down

0 comments on commit 6917883

Please sign in to comment.