我正在使用一个 REACT BIG CALENDAR,我想在我的一个函数中访问 css 值。
我创建了一个样式组件并覆盖了库
const StyledCalendar = styled(Calendar);
现在,例如,日历中有一个 div,其 class = "hello",
如何在函数中访问“hello”的 css 值?类似于在手写笔中的属性查找。
我已经尝试过window.getComputedStyle(elem, null).getPropertyValue("width")
,但这给出了父组件的 css。