How can I make a CSS transform work with a react component? The user presses a div (side-nav-4a) below, and it renders a component in another sibling component. The CSS transform causes nothing to render. Removing the transform in CSS will render the component.
CSS
side-nav-4a {
grid-column: 1 / span 1;
grid-row: 17 / span 4;
background: #EFF0F0;
font-family: 'Lato', sans-serif;
font-size: medium;
transition: background 0.2s ease;
color: #757575;
text-align: center;
min-width: 11.4rem;
&:hover, &:focus {
background: #DADBDB;
cursor: pointer;
}
//&:active {
// transform: scale(.97);
// z-index: -1;
//}
}
.openings-feesA-key {
text-align: center;
vertical-align: middle;
line-height: 10rem;
}
Clicked div (React component):
import React from "react";
export default class SideBar4a extends React.Component {
render() {
const date = new Date().getFullYear();
return (
<div onClick={this.props.setOpeningsAndFeesA} className='openings-feesA-key'>
<h3>FEES {date}</h3>
</div>
);
}
}
React component that renders:
import React from 'react';
export default () => {
return (
<div className='intermezzi-content'>
<p>some intermezzi content</p>
</div>
)
}