-
Inline styles
-
Styled components
const StyledButton = styled.button` color: blue; `;
-
Importing css files and ensuring unique class names (BEM)
import "./ButtonStyles.css"
- this will add the CSS to the header, as is in the file.
-
CSS modules
- build time transformation
- supported by CRA by default
- right webpack plugins will tweak the class names
See usage with the
classnames
package.
matobeno1 / styling-in-react Goto Github PK
View Code? Open in Web Editor NEWStyling in React apps.