Skip to content
Discussion options

You must be logged in to vote

I was able to solve it with following steps;

copy style.css from sonner repo and add it to your project e.g. ./styles/sonner.css
add following code to your root.tsx file to import styles using links function;

import { cssBundleHref } from '@remix-run/css-bundle';
import styles from '~/styles/global.css?url';
import sonnerStyles from '~/styles/sonner.css?url';

export const links: LinksFunction = () => [
  { rel: 'stylesheet', href: styles },
  { rel: 'stylesheet', href: sonnerStyles },
  ...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : []),
];

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by merthanmerter
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants