Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
/ fe-google-calendar Public archive

Wrapper for Google Calendar iframe for React. Multiple calendars support, nice syntax.

Notifications You must be signed in to change notification settings

trisbee/fe-google-calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@trisbee/google-calendar

Wrapper for Google Calendar iframe. Multiple calendars support, nice syntax.

Example usage

import GoogleCalendar, { Holidays } from '@trisbee/google-calendar'

/** for example your shared calendars */
const shared = {
    vaccations: {
        src: 'en.czech#[email protected]',
        color: '#B1365F',
    },
    booking: {
        src: 'en.spain#[email protected]',
        color: '#23164E',
    },
};

/** you can show national holidays if you want to */
const calendars = [
    shared.vaccations,
    shared.booking,
    Holidays.CZECHIA,
    Holidays.SLOVAKIA,
    Holidays.PERU,
    Holidays.SPAIN,
    Holidays.ITALY,
];

const { timeZone } = Intl.DateTimeFormat().resolvedOptions();

return (
    <GoogleCalendar
        title={'Nice calendar'}
        calendars={calendars}
        language={'en'}
        timeZone={timeZone}
    />
)

About

Wrapper for Google Calendar iframe for React. Multiple calendars support, nice syntax.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published