I am trying to import css styles into js file, but i cannot use styles properly
in my file Graph.js:
import React from 'react';
import styles from './Graph.css';
import Center from './Center/Center'
class Graph extends React.Component {
render(){
return(
<div className={styles.graph}>
<Center>test</Center>
</div>
);
}
}
export default Graph;
I try to use style from file Graph.css
which looks like this:
.graph {
height: 500px;
width: 500px;
border: 1px solid grey;
}
Is there a possibility to manage importing styles to components this way?