I'm trying to test the sidebar example from rainbow ui ( https://react-rainbow.io/#/Sidebar )
const SideBarContainer = styled.div.attrs(props => {
return props.theme.rainbow.palette;
})
But I'm getting the error that props.theme.rainbow.palette is unresolved. How can I fix this?
As I explain on my comment you need to wrap your react app in a Application
component like explain in the Like it's explain in the doc from React Rainbow:
export default function App() {
return (
<div className="App">
<Application>
<Header />
</Application>
</div>
);
}
I made a code SandBox of the React Rainbow sideBar demo that I pass in functional components:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.