I'm new to NextJS and currently converting a plain ReactJS project.
One thing I don't really get yet is how to properly use CSS.
I have a Button component that takes a standard class plus dynamic class names from the parent component. As you can see the class names are being passed through the prop button class - how do I properly process these class names? Currently it says undefined.
<Button buttonClass={"primary__button hero-button"}>Jetzt loslegen</Button>
import React from "react";
import style from "./button.module.scss";
export const Button = ({children, buttonClass, onClick}) => {
return (
<button className={style.basic__button + " " + style[buttonClass]} onClick={onClick}>{children}</button>
)
};
button.module.scss? It seems like you are passing buttonClassprimary__button hero-buttonto component, do you have such className?