From cd51efcb739ca6a8b4f82232a8db89ed11f453b6 Mon Sep 17 00:00:00 2001 From: Strek Date: Sat, 25 Mar 2023 02:01:17 +0530 Subject: [PATCH] chore: format codebase --- src/components/Breadcrumbs.tsx | 6 +- src/components/Button.tsx | 6 +- src/components/DocsFooter.tsx | 8 +- src/components/Icon/IconHint.tsx | 2 +- src/components/Layout/Feedback.tsx | 8 +- src/components/Layout/Footer.tsx | 10 +- src/components/Layout/HomeContent.js | 232 +++++++++--------- src/components/Layout/Page.tsx | 26 +- .../Layout/Sidebar/SidebarButton.tsx | 10 +- src/components/Layout/Sidebar/SidebarLink.tsx | 8 +- .../Layout/Sidebar/SidebarRouteTree.tsx | 2 +- .../Layout/SidebarNav/SidebarNav.tsx | 8 +- src/components/Layout/Toc.tsx | 12 +- src/components/Layout/TopNav/TopNav.tsx | 60 ++--- src/components/MDX/BlogCard.tsx | 18 +- src/components/MDX/Challenges/Challenge.tsx | 14 +- src/components/MDX/Challenges/Challenges.tsx | 8 +- src/components/MDX/Challenges/Navigation.tsx | 14 +- src/components/MDX/CodeBlock/CodeBlock.tsx | 6 +- src/components/MDX/CodeBlock/index.tsx | 2 +- src/components/MDX/CodeDiagram.tsx | 4 +- src/components/MDX/ConsoleBlock.tsx | 20 +- src/components/MDX/Diagram.tsx | 6 +- src/components/MDX/DiagramGroup.tsx | 2 +- src/components/MDX/ExpandableCallout.tsx | 6 +- src/components/MDX/ExpandableExample.tsx | 26 +- src/components/MDX/Heading.tsx | 10 +- src/components/MDX/InlineCode.tsx | 4 +- src/components/MDX/Intro.tsx | 2 +- src/components/MDX/MDXComponents.module.css | 6 +- src/components/MDX/MDXComponents.tsx | 52 ++-- src/components/MDX/PackageImport.tsx | 2 +- src/components/MDX/Sandpack/Console.tsx | 8 +- src/components/MDX/Sandpack/CustomPreset.tsx | 10 +- .../MDX/Sandpack/DownloadButton.tsx | 4 +- src/components/MDX/Sandpack/ErrorMessage.tsx | 6 +- src/components/MDX/Sandpack/NavigationBar.tsx | 10 +- .../MDX/Sandpack/OpenInCodeSandboxButton.tsx | 4 +- src/components/MDX/Sandpack/Preview.tsx | 6 +- src/components/MDX/Sandpack/ResetButton.tsx | 4 +- src/components/MDX/Sandpack/SandpackRoot.tsx | 2 +- src/components/MDX/Sandpack/index.tsx | 20 +- src/components/MDX/SimpleCallout.tsx | 4 +- src/components/MDX/TeamMember.tsx | 14 +- src/components/MDX/TerminalBlock.tsx | 16 +- src/components/MDX/YouWillLearnCard.tsx | 6 +- src/components/PageHeading.tsx | 8 +- src/components/SocialBanner.tsx | 4 +- src/components/Tag.tsx | 2 +- src/pages/_document.tsx | 2 +- 50 files changed, 365 insertions(+), 365 deletions(-) diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index ca3afa851..cb9334124 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -13,14 +13,14 @@ function Breadcrumbs({breadcrumbs}: {breadcrumbs: RouteItem[]}) { (crumb, i) => crumb.path && !crumb.skipBreadcrumb && ( -
+
- + {crumb.title} - + diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index d2c2c25de..4440a6976 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -27,7 +27,7 @@ export const DocsPageFooter = memo( <> {prevRoute?.path || nextRoute?.path ? ( <> -
+
{prevRoute?.path ? ( - + {type} {title} diff --git a/src/components/Icon/IconHint.tsx b/src/components/Icon/IconHint.tsx index b802bc79c..500f032d6 100644 --- a/src/components/Icon/IconHint.tsx +++ b/src/components/Icon/IconHint.tsx @@ -10,7 +10,7 @@ export const IconHint = memo(function IconHint({ }) { return ( void}) { const [isSubmitted, setIsSubmitted] = useState(false); return ( -
-

+

+

{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}

{!isSubmitted && (
)} @@ -1324,14 +1324,14 @@ function BrowserChrome({children, hasPulse, hasRefresh, domain, path}) { {restartId > 0 && (
)}
-
+
{children}
@@ -1353,9 +1353,9 @@ function ConferencePage({slug}) { function TalksLoading() { return ( -
+
-
+
@@ -1364,7 +1364,7 @@ function TalksLoading() {
-
+
@@ -1372,7 +1372,7 @@ function TalksLoading() {
-
+
@@ -1380,7 +1380,7 @@ function TalksLoading() {
-
+
@@ -1388,7 +1388,7 @@ function TalksLoading() {
-
+
@@ -1447,7 +1447,7 @@ function VideoList({videos, emptyHeading}) { return (

{heading}

@@ -1468,13 +1468,13 @@ function SearchInput({value, onChange}) { Search
-
- +
+
onChange(e.target.value)} @@ -1503,7 +1503,7 @@ function ConferenceLayout({conf, children}) { navigate(e.target.value); }); }} - className="appearance-none pr-8 bg-transparent text-primary-dark text-2xl font-bold mb-0.5" + className="mb-0.5 appearance-none bg-transparent pr-8 text-2xl font-bold text-primary-dark" style={{ backgroundSize: '4px 4px, 4px 4px', backgroundRepeat: 'no-repeat', @@ -1525,8 +1525,8 @@ function ConferenceLayout({conf, children}) { function Cover({background, children}) { return ( -
-
+
+
{children}

{video.title}

-

+

{video.description}

@@ -1569,7 +1569,7 @@ function Video({video}) { function Code({children}) { return ( - + {children} ); @@ -1586,13 +1586,13 @@ function Thumbnail({video}) { aria-hidden="true" tabIndex={-1} className={cn( - 'outline-link dark:outline-link outline-offset-2 aspect-video w-32 xs:w-36 select-none flex-col shadow-inner-border rounded-lg flex items-center overflow-hidden justify-center align-middle text-white/50 bg-cover bg-white bg-[conic-gradient(at_top_right,_var(--tw-gradient-stops))]', + 'flex aspect-video w-32 select-none flex-col items-center justify-center overflow-hidden rounded-lg bg-white bg-[conic-gradient(at_top_right,_var(--tw-gradient-stops))] bg-cover align-middle text-white/50 shadow-inner-border outline-offset-2 outline-link dark:outline-link xs:w-36', image === 'blue' && 'from-yellow-50 via-blue-50 to-purple-60', image === 'red' && 'from-yellow-50 via-red-50 to-purple-60', image === 'green' && 'from-yellow-50 via-green-50 to-purple-60', image === 'purple' && 'from-yellow-50 via-purple-50 to-purple-60', typeof image === 'object' && 'from-gray-80 via-gray-95 to-gray-70', - video.url && 'hover:opacity-95 transition-opacity' + video.url && 'transition-opacity hover:opacity-95' )} style={{ backgroundImage: @@ -1602,19 +1602,19 @@ function Thumbnail({video}) { }}> {typeof image !== 'string' ? ( <> -
+
{image.speakers.map((src, i) => ( ))}
- - + + React Conf
@@ -1656,7 +1656,7 @@ function LikeButton({video}) { -
-
+
-
-
+
+
Learn @@ -301,9 +301,9 @@ export default function TopNav({
@@ -313,7 +313,7 @@ export default function TopNav({ onClick={() => { window.__setPreferredTheme('dark'); }} - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex h-12 w-12 items-center justify-center rounded-full outline-link transition-transform hover:bg-primary/5 active:scale-95 hover:dark:bg-primary-dark/5"> {darkIcon}
@@ -324,7 +324,7 @@ export default function TopNav({ onClick={() => { window.__setPreferredTheme('light'); }} - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex h-12 w-12 items-center justify-center rounded-full outline-link transition-transform hover:bg-primary/5 active:scale-95 hover:dark:bg-primary-dark/5"> {lightIcon}
@@ -334,7 +334,7 @@ export default function TopNav({ target="_blank" rel="noreferrer noopener" aria-label="Open on GitHub" - className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link"> + className="flex h-12 w-12 items-center justify-center rounded-full outline-link transition-transform hover:bg-primary/5 active:scale-95 hover:dark:bg-primary-dark/5"> {githubIcon}
@@ -346,19 +346,19 @@ export default function TopNav({ {isOpen && (
+ className="no-bg-scrollbar isolate grow overflow-y-scroll bg-wash dark:bg-wash-dark lg:w-[342px]">