From 4e09704eb7228bd14462ad85306d6db9639b0275 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 10 Jun 2019 16:03:33 +0300 Subject: [PATCH] feat: provide named exports api (#1348) BREAKING CHANGE: must use named exports for additional RBC imports ```js import { Calendar, DateLocalizer, momentLocalizer, globalizeLocalizer, move, Views, Navigate, components } from 'react-big-calendar'; ``` --- .size-snapshot.json | 22 +++++++++++----------- README.md | 12 ++++++------ src/index.js | 31 +++++++++++-------------------- 3 files changed, 28 insertions(+), 37 deletions(-) diff --git a/.size-snapshot.json b/.size-snapshot.json index fddefc812..8e0faf8cc 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,25 +1,25 @@ { "./dist/react-big-calendar.js": { - "bundled": 553987, - "minified": 170205, - "gzipped": 50025 + "bundled": 554087, + "minified": 170209, + "gzipped": 49950 }, "./dist/react-big-calendar.min.js": { - "bundled": 490228, - "minified": 150810, - "gzipped": 45487 + "bundled": 490328, + "minified": 150824, + "gzipped": 45415 }, "dist/react-big-calendar.esm.js": { - "bundled": 169712, - "minified": 81562, - "gzipped": 20075, + "bundled": 169648, + "minified": 81524, + "gzipped": 20082, "treeshaked": { "rollup": { - "code": 62970, + "code": 59035, "import_statements": 1402 }, "webpack": { - "code": 66409 + "code": 62470 } } } diff --git a/README.md b/README.md index 420831db6..855f00e2e 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,14 @@ Regardless of your choice, you **must** choose a localizer to use this library: #### Moment.js ```js -import BigCalendar from 'react-big-calendar' +import { Calendar, momentLocalizer } from 'react-big-calendar' import moment from 'moment' -const localizer = BigCalendar.momentLocalizer(moment) +const localizer = momentLocalizer(moment) const MyCalendar = props => (
- ( #### Globalize.js v0.1.1 ```js -import BigCalendar from 'react-big-calendar' +import { Calendar, globalizeLocalizer } from 'react-big-calendar' import globalize from 'globalize' -const localizer = BigCalendar.globalizeLocalizer(globalize) +const localizer = globalizeLocalizer(globalize) const MyCalendar = props => (
-