1.0.2 • Published 10 months ago

chronous v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

npm npm bundle size

npm

$ npm install chronous

yarn

$ yarn add chronous
import { useState } from 'react'
import Chronous from 'chronous'
import ModalWindow from 'src/features/ModalWindow'
import { EventT } from 'src/types'
import ChevronRight from 'src/assets/icons/chevron-right.svg'
import ChevronLeft from 'src/assets/icons/chevron-left.svg'
import ChevronDown from 'src/assets/icons/chevron-down.svg'

export const App = () => {
  const [events, setEvents] = useState<EventT[]>([])

  return (
    <Chronous
      events={events}
      view="week"
      config={[{ maxWidth: 450, mode: 'mobile' }]}
      nextButton={<ChevronRight />}
      prevButton={<ChevronLeft />}
      dropDownArrow={<ChevronDown />}
      eventModal={({ onClose, ...event }) => (
        <ModalWindow
          onClose={onClose}
          id={event.id}
          events={events}
          selectedEvent={event}
          setEvents={setEvents}
        />
      )}
      newEventModal={({ onClose, time, day }) => (
        <ModalWindow
          day={day}
          time={time}
          events={events}
          onClose={onClose}
          setEvents={setEvents}
        />
      )}
    />
  )
}
IE / EdgeFirefoxChromeSafari
IE11, Edgelast 3 versionslast 3 versionslast 3 versions
1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.1.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago