/*
 * Copyright (c) 2018-present, Revolut LTD.
 *
 * This source code is licensed under the Apache 2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
import React from 'react'
import styled from 'styled-components'
import moment from 'moment'
import { Calendar } from '.'

const Wrapper = styled.div`
  width: 300px;
`
export const ExampleCalendar = () => {
  const [value, setValue] = React.useState(moment())
  const onChange = (aValue: any) => {
    setValue(aValue)
  }
  return (
    <Wrapper>
      <div>{value.format()}</div>
      <Calendar value={value} onChange={onChange} />
    </Wrapper>
  )
}

export default {
  component: Calendar,
  title: 'Calendar',
}
