diff --git a/components/mdx.tsx b/components/mdx.tsx index c34a42d..f86ff6b 100644 --- a/components/mdx.tsx +++ b/components/mdx.tsx @@ -7,6 +7,9 @@ export function S({ $?: string, _?: string, } & React.ComponentProps) { - const cls = [className, ...(modifier.match(/\.(\w+)/g) ?? [])].map(s => s.slice(1)).join(' '); + const cls = [ + ...(className ? [className] : []), + ...(modifier.match(/\.(\w+)/g) ?? []), + ].map(s => s.slice(1)).join(' '); return {children}; }