Skip to content

Commit

Permalink
docs: update desc and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nhanluongoe committed Mar 27, 2024
1 parent 4c239d4 commit 7749d43
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
8 changes: 3 additions & 5 deletions site/components/docs-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NextSeo } from 'next-seo';
import Link from 'next/link';
import * as React from 'react';
import { Footer } from './sections/footer';
import GitHub from '../assets/github.svg';

const TableItem: React.FC<{
href: string;
Expand Down Expand Up @@ -35,11 +36,8 @@ export default function DocsLayout({ meta, children }) {
<a href="/" className="font-bold text-2xl">
react-stacked-toast
</a>
<a
className="flex text-toast-600 underline"
href="https://github.com/nhanluongoe/react-stacked-toast"
>
GitHub
<a href="https://github.com/nhanluongoe/react-stacked-toast">
<GitHub />
</a>
</header>

Expand Down
20 changes: 14 additions & 6 deletions site/pages/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,22 @@ const App = () => {
import { toast } from 'react-stacked-toast';

const Component = () => {
const handleClick = () => {
// Quickly make a toast
toast("Here is your toast");

// Or need more customization
toast({
title: 'React Stacked Toast',
description: 'Here is your toast!',
icon: '🍞'
...
});
}

return (
<button
onClick={() => {
toast({
title: 'React Stacked Toast',
description: 'Here is your toast!',
});
}}
onClick={handleClick}
>
Show toast
</button>
Expand Down
4 changes: 2 additions & 2 deletions site/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const Steps = () => (
code={
<>
<span className="text-toast-600">toast</span>
<span className="text-toast-800">{`({title: "Wanna a toast?"})`}</span>
<span className="text-toast-800">{`("Wanna a toast?")`}</span>
</>
}
/>
Expand All @@ -76,7 +76,7 @@ const Features = () => (
<div className="my-12 grid gap-x-8 gap-y-5 grid-cols-2 md:grid-cols-3">
<Feature>Easy to use</Feature>
<Feature>Customizable</Feature>
<Feature>Tiny</Feature>
<Feature>Stackable</Feature>
</div>
);

Expand Down

0 comments on commit 7749d43

Please sign in to comment.