Skip to content

Commit

Permalink
Revert "Adds color guideline documentation (#989)"
Browse files Browse the repository at this point in the history
This reverts commit 2aa30f5.
  • Loading branch information
egoens authored Aug 27, 2024
1 parent 2aa30f5 commit 136f328
Show file tree
Hide file tree
Showing 53 changed files with 427 additions and 1,871 deletions.
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

0 comments on commit 136f328

Please sign in to comment.