Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mongodb/snooty into feature…
Browse files Browse the repository at this point in the history
…-structured-data
  • Loading branch information
rayangler committed Oct 8, 2024
2 parents bf3ecb4 + 6f3b77b commit 05b032c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/components/Footnote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { useDarkMode } from '@leafygreen-ui/leafygreen-provider';
import { palette } from '@leafygreen-ui/palette';
import { css, cx } from '@leafygreen-ui/emotion';
import { theme } from '../../theme/docsTheme';
import ComponentFactory from '../ComponentFactory';
import { getNestedValue } from '../../utils/get-nested-value';
import { intersperse } from '../../utils/intersperse';
Expand All @@ -12,9 +13,13 @@ const tableStyling = (darkMode) => css`
border: 0;
border-collapse: collapse;
margin: 24px 0;
font-size: 14px;
font-size: ${theme.fontSize.small};
line-height: 24px;
tbody tr td a {
font-size: ${theme.fontSize.small};
}
tbody tr td div.highlight pre {
background-color: inherit;
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/Roles/Abbr.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import InlineDefinition from '@leafygreen-ui/inline-definition';
import { theme } from '../../theme/docsTheme';

const Abbr = ({
nodeData: {
Expand All @@ -17,7 +18,11 @@ const Abbr = ({
expansion = expansion.split(')')[0];
abbr = abbr.trim();
}
return <InlineDefinition definition={expansion}>{abbr}</InlineDefinition>;
return (
<InlineDefinition popoverZIndex={theme.zIndexes.popovers} definition={expansion}>
{abbr}
</InlineDefinition>
);
};

Abbr.propTypes = {
Expand Down
1 change: 1 addition & 0 deletions src/theme/docsTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const zIndexes = {
sidenav: 900,
header: 1000,
widgets: 2000,
popovers: 10000,
};

// media queries that define system color preference
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/__snapshots__/Footnote.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ exports[`renders correctly 1`] = `
border: 0;
border-collapse: collapse;
margin: 24px 0;
font-size: 14px;
font-size: 13px;
line-height: 24px;
}
.emotion-0 tbody tr td a {
font-size: 13px;
}
.emotion-0 tbody tr td div.highlight pre {
background-color: inherit;
}
Expand Down

0 comments on commit 05b032c

Please sign in to comment.