Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Adds color guideline documentation" #990

Merged
merged 1 commit into from
Aug 28, 2024
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: 0 additions & 7 deletions next/components/example-box/index.tsx

This file was deleted.

18 changes: 8 additions & 10 deletions next/components/mdx/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ const sourceCodePro = Source_Code_Pro({
subsets: ['latin'],
});

// TODO: apply atomicClasses to other headers once
// type definition error is resolved (see H2)
interface HeadingElement
extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> {
atomicClasses?: string;
}

const HashAnchor = ({ children, id }: { children: React.ReactNode; id: string }): JSX.Element => (
<div className={styles.hashAnchor}>
<a href={`#${id}`} aria-hidden="true" className={styles.hashAnchorLink}>
Expand All @@ -44,12 +37,17 @@ const HashAnchor = ({ children, id }: { children: React.ReactNode; id: string })
</div>
);

export function H2({ children, atomicClasses, ...rest }: HeadingElement): JSX.Element {
export function H2({
children,
...rest
}: React.DetailedHTMLProps<
React.HTMLAttributes<HTMLHeadingElement>,
HTMLHeadingElement
>): JSX.Element {
const id = generateSlug({ level: 'section', children });
const classes = classnames({ [`${atomicClasses}`]: atomicClasses, 'mt6 mb3': !atomicClasses });

const contents = (
<Title {...rest} id={id} size={3} headingLevel={2} className={classes}>
<Title {...rest} id={id} size={3} headingLevel={2} className="mt6 mb3">
{children}
</Title>
);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
418 changes: 418 additions & 0 deletions next/pages/guidelines/color.tsx

Large diffs are not rendered by default.

339 changes: 0 additions & 339 deletions next/pages/guidelines/color/accessibility.tsx

This file was deleted.

200 changes: 0 additions & 200 deletions next/pages/guidelines/color/overview.tsx

This file was deleted.

Loading
Loading