Next.js Discord

Discord Forum

FullScreen button in next using shadcn

Unanswered
Netherland Dwarf posted this in #help-forum
Open in Discord
Original message was deleted.

9 Replies

Netherland Dwarf
Any1 able to help?
Original message was deleted
import "@/app/globals.css";
@Ray `import "@/app/globals.css";`
Netherland Dwarf
If i do this i can't use this code because it is not improted as a style
const mainStyles = isFullscreen
? ${styles.fullscreenMain}
: ${styles.normalMain};
create another file eg. FullScreenToggle.module.css and put the styles there
then
import "@/app/globals.css";
import styles from "@/app/styles/FullScreenToggle.module.css"
if you use css module, you can't have tailwind directives inside
well but with tailwind, you don't need css module
you can do something like this
<div className={isFullScreen ? "fullscreenMain classes" : "normalMain classes"}>
...
</div>

or use clsx
Netherland Dwarf
Ohh alright i'll try it in a sec thanks for the hep!