45
rated 0 times
[
51]
[
6]
/ answers: 1 / hits: 5388
/ 6 Years ago, wed, november 14, 2018, 12:00:00
How can I add CSS for react semantic UI ? I am using create react app. I have installed semantic-ui-react and CSS CDN: https://react.semantic-ui.com/usage/?fbclid=IwAR3ZBaJfpxHGiNcAvophLp7IAPO-gHZfDvSOLs8h-n0-_29ncPoOdjwCX7o#content-delivery-network-cdn
loginForm.js:
import React from react;
import { Button, Form, Header } from semantic-ui-react;
import styles from './loginForm.css';
const LoginForm = () => (
<Form className={styles.formStyle}>
<Button className={styles.buttonStyle}>Login</Button>
</Form>
);
export default LoginForm;
loginForm.css:
.formStyle {
margin-left: 500px;
margin-top: 100px;
width: 550px;
}
.buttonStyle {
border-radius: 18px;
width: 200px;
background-color:#3865FE;
}
Above CSS code is not working for loginForm.js why so ? I also tried following :
<Form style={styles.formStyle}>
<Button style={styles.buttonStyle}>Login</Button>
</Form>
Above code is also not working.
More From » css