mirror of
https://github.com/encounter/react-add-to-calendar.git
synced 2026-07-10 21:18:44 -07:00
56 lines
1.9 KiB
React
56 lines
1.9 KiB
React
import React from 'react'
|
|
import AddToCalendar from 'react-add-to-calendar'
|
|
|
|
export default React.createClass({
|
|
displayName: 'Change Dropdown Labels',
|
|
|
|
render () {
|
|
let event = {
|
|
title: 'Sample Event',
|
|
description: 'This is the sample event provided as an example only',
|
|
location: 'Portland, OR',
|
|
startTime: '2016-09-16T20:15:00-04:00',
|
|
endTime: '2016-09-16T21:45:00-04:00'
|
|
};
|
|
|
|
let items = [
|
|
{ outlook: 'Outlook' },
|
|
{ outlookcom: 'Outlook.com' },
|
|
{ apple: 'iCal' },
|
|
{ yahoo: 'Yahoo!' },
|
|
{ google: 'Google' }
|
|
];
|
|
|
|
return (
|
|
<div className="row">
|
|
<pre className="column example__code">
|
|
<code className="js">
|
|
{"let items = ["}<br/>
|
|
|
|
{"\{ outlook: 'Outlook' \}"}<br/>
|
|
|
|
{"\{ outlookcom: 'Outlook.com' \}"}<br/>
|
|
|
|
{"\{ apple: 'iCal' \}"}<br/>
|
|
|
|
{"\{ yahoo: 'Yahoo!' \}"}<br/>
|
|
|
|
{"\{ google: 'Google' \}"}<br/>
|
|
{"];"}<br/><br/>
|
|
</code>
|
|
<code className="jsx">
|
|
{"<AddToCalendar"}<br/>
|
|
|
|
{"event={event}"}<br/>
|
|
|
|
{"listItems=\{items\} />"}
|
|
</code>
|
|
</pre>
|
|
<div className="column">
|
|
<AddToCalendar event={event} listItems={items} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
})
|