Skip to content

An opinionated toast component for React.

Update warning icon (#198)

Emil Kowalski43d8f2dd3060
diff --git a/src/assets.tsx b/src/assets.tsx
index 009ff0f..328362d 100644
--- a/src/assets.tsx
+++ b/src/assets.tsx
@@ -46,9 +46,12 @@ const SuccessIcon = (
);
const WarningIcon = (
- <svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg">
- <path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z" />
- <path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"/>
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" height="20" width="20">
+ <path
+ fillRule="evenodd"
+ d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"
+ clipRule="evenodd"
+ />
</svg>
);
diff --git a/website/src/components/Head/index.tsx b/website/src/components/Head/index.tsx
new file mode 100644
index 0000000..172d466
--- /dev/null
+++ b/website/src/components/Head/index.tsx
@@ -0,0 +1,37 @@
+import NextHead from 'next/head';
+
+const ogImage = 'https://sonner.emilkowal.ski/og.png';
+
+const Head = () => (
+ <NextHead>
+ {/* Title */}
+ <title>Sonner</title>
+ <meta name="og:title" content="Sonner" />
+
+ {/* Description */}
+ <meta name="description" content="An opinionated toast component for React." />
+ <meta name="og:description" content="An opinionated toast component for React." />
+
+ {/* Image */}
+ <meta name="twitter:image" content={ogImage} />
+ <meta name="og:image" content={ogImage} />
+
+ {/* URL */}
+ <meta name="og:url" content="https://sonner.emilkowal.ski/" />
+
+ {/* General */}
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta httpEquiv="Content-Language" content="en" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@emilkowalski_" />
+ <meta name="author" content="Emil Kowalski" />
+
+ {/* Favicons */}
+ <meta name="msapplication-TileColor" content="#ffffff" />
+ <meta name="theme-color" content="#ffffff" />
+ <link rel="shortcut icon" href="favicon.ico" />
+ <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
+ </NextHead>
+);
+
+export default Head;
diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx
index 7f207c5..65e071c 100644
--- a/website/src/pages/index.tsx
+++ b/website/src/pages/index.tsx
@@ -8,6 +8,7 @@ import { Footer } from '@/src/components/Footer';
import { Position } from '@/src/components/Position';
import { Usage } from '@/src/components/Usage';
import { Other } from '@/src/components/Other/Other';
+import Head from '../components/Head';
export default function Home() {
const [expand, setExpand] = React.useState(false);
@@ -17,6 +18,7 @@ export default function Home() {
return (
<div className="wrapper">
+ <Head />
<Toaster theme="light" richColors={richColors} closeButton={closeButton} expand={expand} position={position} />
<main className="container">
<Hero />