-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
198 additions
and
82 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
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,52 @@ | ||
import { Button } from '@/ui/button'; | ||
import { SparkleCard } from '@/ui/sparkle-card'; | ||
import { useToast } from '@pheralb/toast'; | ||
import { Sparkles } from 'lucide-react'; | ||
import { Github } from './icons'; | ||
|
||
const Hero = () => { | ||
const toast = useToast(); | ||
return ( | ||
<SparkleCard className="rounded-md border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900"> | ||
<div className="mb-4 flex flex-col space-y-1"> | ||
<h1 className="text-5xl font-bold tracking-tight lg:text-4xl">Toast</h1> | ||
<p className="font-medium text-neutral-500 dark:text-neutral-400"> | ||
An accessible and beautiful toast library for React. | ||
</p> | ||
</div> | ||
<div className="flex items-center space-x-2"> | ||
<Button | ||
variant="default" | ||
onClick={() => | ||
toast.open({ | ||
text: 'pheralb/toast', | ||
variant: 'success', | ||
description: '✨ A beautiful toast library for React', | ||
}) | ||
} | ||
> | ||
<Sparkles size={14} /> | ||
<span>Render a toast</span> | ||
</Button> | ||
<Button | ||
variant="outline" | ||
onClick={() => | ||
toast.open({ | ||
text: 'Hello, world!', | ||
description: 'This is a description', | ||
variant: 'info', | ||
action() { | ||
console.log('Action clicked'); | ||
}, | ||
}) | ||
} | ||
> | ||
<Github height={14} /> | ||
<span>View on GitHub</span> | ||
</Button> | ||
</div> | ||
</SparkleCard> | ||
); | ||
}; | ||
|
||
export default Hero; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Link } from '@remix-run/react'; | ||
import { Astro, Nextjs, Remix } from './icons'; | ||
|
||
const usageLinks = [ | ||
{ | ||
label: 'Next.js', | ||
to: '/docs/nextjs', | ||
icon: Nextjs, | ||
}, | ||
{ | ||
label: 'Remix', | ||
to: '/docs/remix', | ||
icon: Remix, | ||
}, | ||
{ | ||
label: 'Astro', | ||
to: '/docs/astro', | ||
icon: Astro, | ||
}, | ||
]; | ||
|
||
const Usage = () => { | ||
return ( | ||
<div className="flex items-center space-x-2"> | ||
{usageLinks.map((link) => { | ||
return ( | ||
<Link | ||
key={link.to} | ||
to={link.to} | ||
className="text-md flex flex-col items-center space-y-3 rounded-md border border-neutral-200 p-[20px] text-sm no-underline shadow-sm transition-colors duration-100 hover:bg-neutral-100 dark:border-neutral-800 dark:hover:bg-neutral-800/50" | ||
> | ||
<link.icon height={35} /> | ||
<span>Install on {link.label}</span> | ||
</Link> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Usage; |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
import { cn } from '@/utils'; | ||
import { Outlet } from '@remix-run/react'; | ||
|
||
export default function DocsLayout() { | ||
return ( | ||
<article | ||
className={cn( | ||
'w-full max-w-3xl py-8', | ||
'prose prose-neutral dark:prose-invert', | ||
'prose-headings:font-medium prose-headings:tracking-tight', | ||
'prose-a:underline-offset-[4px] prose-a:decoration-solid dark:prose-a:decoration-neutral-500 prose-a:decoration-neutral-400', | ||
'prose-figure:my-0 prose-p:mb-1 prose-p:text-pretty', | ||
'prose-pre:border dark:prose-pre:border-neutral-800 prose-pre:border-neutral-200', | ||
)} | ||
> | ||
<Outlet /> | ||
</article> | ||
); | ||
return <Outlet />; | ||
} |