Just diving into Material UI @ next, and I'm excited about the Styled Components feature.
But struggling with centering the Button component using Styled Components. So far, only able to achieve it using the styles approach like this:
const styles = {
container: {
textAlign: "center"
}
};
class Landing extends Component {
render() {
return (
...
<div style={styles.container}>
<Button variant="raised" color="primary">
I am a button
</Button>
</div>
);
}
}
Prefer to avoid that and stick with Styled Components like this:
const Container = styled.div`
text-align: "center";
`;
But oddly enough, it's not working even though they appear identical. Is there a difference between text-align and textAlign in terms of CSS properties?