Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,40 @@ import CategoryList from '@site/src/components/CategoryList';

library.add(fab, fas, far); // Add all icons to the library so you can use them without importing them individually.

// Custom list components with Tailwind classes to restore styling removed by Preflight
function Ul({ children, ...props }) {
return (
<ul className="list-disc pl-8 my-4" {...props}>
{children}
</ul>
);
}

function Ol({ children, ...props }) {
return (
<ol className="list-decimal pl-8 my-4" {...props}>
{children}
</ol>
);
}

function Li({ children, ...props }) {
return (
<li className="my-1" {...props}>
{children}
</li>
);
}

export default {
// Re-use the default mapping
...MDXComponents,
Icon: Icon, // Make the iconify Icon component available in MDX as <Icon />.
FAIcon: FontAwesomeIcon, // Make the FontAwesomeIcon component available in MDX as <FAIcon />.
// Add custom components
CategoryList: CategoryList, // Make the CategoryList component available in MDX as <CategoryList />.
// Override HTML elements with Tailwind-styled versions
ul: Ul,
ol: Ol,
li: Li,
};
Loading