-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(website): extract shared code heading styling into component (…
…#9414) * refactor(website): extract shared code heading styling into component * chore: remove redundant variable
- Loading branch information
1 parent
5d1a4c2
commit f1fdd5b
Showing
5 changed files
with
45 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { ReactNode } from 'react'; | ||
import { Anchor } from './Anchor'; | ||
|
||
export interface CodeListingProps { | ||
/** | ||
* The value of this heading. | ||
*/ | ||
children: ReactNode; | ||
/** | ||
* Additional class names to apply to the root element. | ||
*/ | ||
className?: string | undefined; | ||
/** | ||
* The href of this heading. | ||
*/ | ||
href?: string | undefined; | ||
} | ||
|
||
export function CodeHeading({ href, className, children }: CodeListingProps) { | ||
return ( | ||
<div | ||
className={`flex flex-row flex-wrap place-items-center gap-1 break-all font-mono text-lg font-bold ${className}`} | ||
> | ||
{href ? <Anchor href={href} /> : null} | ||
{children} | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f1fdd5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
discord-js – ./apps/website
discord-js-discordjs.vercel.app
discord-js-number-one.vercel.app
discord.js.org
discord-js-git-main-discordjs.vercel.app
www.discordjs.dev
discordjs.dev