GithubHelp home page GithubHelp logo

courthub74 / add-to-calendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from culturehq/add-to-calendar

0.0 1.0 0.0 5.31 MB

A small package for adding an event to a calendar.

Home Page: https://engineering.culturehq.com/add-to-calendar/

License: MIT License

CSS 9.65% TypeScript 85.05% JavaScript 5.30%

add-to-calendar's Introduction

@culturehq/add-to-calendar

Build Status Package Version

A small package for adding an event to a calendar.

Getting started

First, add @culturehq/add-to-calendar to your package.json dependencies, then install using either npm install or yarn install. Next, you can add the component through:

<AddToCalendar
  event={{
    name: "Happy Hour",
    details: "Let's go after work",
    location: "Boston, MA",
    startsAt: "2018-12-06T17:00:00-05:00",
    endsAt: "2018-12-06T18:00:00-05:00"
  }}
/>

To get the styles, be sure it import @culturehq/add-to-calendar/dist/styles.css into your application. You can style it appropriately for your app by overriding the CSS classes used internally. They are listed in styles.css.

children

The label for the button that triggers the dropdown. Defaults to "Add to My Calendar".

event

Should be an object representing the event to be added to the various calendars. The keys are:

  • name - the name of the event
  • details - the details of the event
  • location - the location of the event
  • startsAt - the start time of the event, formatted as an ISO string
  • endsAt - the end time of the event, formatted as an ISO string

open

Defaults to false. Whether or not the dropdown should start open. (Will be ignored after initial render.)

filename

Used to specify the name of the downloaded iCalendar file (where applicable - Apple Calendar, Outlook). Defaults to "download".

Development

You can run the tests by running yarn test and lint by running yarn lint. You can run the local server by running yarn start which will start the docs server on http://localhost:8080.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CultureHQ/add-to-calendar.

License

The code is available as open source under the terms of the MIT License.

add-to-calendar's People

Contributors

apotap2 avatar dependabot-preview[bot] avatar kddnewton avatar mattytesar avatar mergify[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.