Toast isn't styled upon display (using Tailwind).

UI Components for React
Post Reply
ashl
Posts: 1
Joined: 21 Aug 2023, 15:32

21 Aug 2023, 15:42

As the title mentions, I'm using Tailwind. This is the outcome I'm experiencing:

https://imgur.com/Bu5Qoo5

My .jsx:

Code: Select all

import "./SignUp.css";
import { React, useRef } from "react";
import Button from "../../components/Button/Button";
import "primeicons/primeicons.css";
import { Toast } from "primereact/toast";

function Test() {
	const toast = useRef(null);

	const showMessage = (label, ref, severity) => {
		ref.current.show({
			severity: severity,
			summary: "Oops!",
			detail: label,
			life: 3000,
		});
	};

	const notChecked = () => {
		showMessage("You haven't agreed to the terms.", toast, "warn");
	};

	return (
		<div className="flex min-h-screen flex-col justify-center items-center w-full pt-10 bg-stdblue">
			<Toast ref={toast} />
			<Button text={"NEXT"} func={notChecked} />
		</div>
	);
}

export default Test; 
The css:

Code: Select all

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

* {
	-webkit-tap-highlight-color: transparent;
}
I do have primereact installed and I've tried reinstalling it. I have no idea what's causing this.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

24 Aug 2023, 23:21

Do you need to wait until Unstyled mode is released in 10.0.0 which will support Tailwind?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests