fullcalendar / fullcalendar-react

The official React Component for FullCalendar

Home Page:https://fullcalendar.io/docs/react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to use <FullCalendar /> with `styled-components`

fix777 opened this issue · comments

I'm trying to use styled-components to wrap <FullCalendar /> component in order to do a css customization, but it doesn't work.

If this is a question, please refer to the support page and use Stack Overflow for help. If this is a bug, please supply a runnable, stripped-down demonstration.

commented

@fix777 Did you find a solution? I ran in to the same thing.

commented

@fix777 Did you find a solution? I ran in to the same thing.

You can simply wrap FullCalendar with another element/component and apply styling via the wrapper.
e.g.

const FullCalendarWrapper = styled.div`
  .fc-event-past {
    opacity: 0.4;
  }
`;
<FullCalendarWrapper>
   <FullCalendar .../>
</FullCalendarWrapper>