mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 07:39:07 +03:00
* Move all studio files from /studio to /apps/studio. * Move studio specific prettier ignores. * Fix the ui references from studio. * Fix the css imports. * Fix all package.json issues. * Fix the prettier setup for the studio app. * Add .turbo folder to prettierignore. * Fix the github workflows.
36 lines
773 B
TypeScript
36 lines
773 B
TypeScript
import React, { useState } from 'react'
|
|
|
|
import { DatePicker } from '.'
|
|
import ReactDatePicker from 'react-datepicker'
|
|
|
|
export default {
|
|
title: 'Data/DatePicker',
|
|
component: DatePicker,
|
|
}
|
|
|
|
export const Default = (args: any) => (
|
|
<div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
|
|
<DatePicker />
|
|
</div>
|
|
)
|
|
|
|
export const Simple = () => {
|
|
const [startDate, setStartDate] = useState(new Date())
|
|
const [endDate, setEndDate] = useState(null)
|
|
const onChange = (dates: any) => {
|
|
const [start, end] = dates
|
|
setStartDate(start)
|
|
setEndDate(end)
|
|
}
|
|
return (
|
|
<ReactDatePicker
|
|
selected={startDate}
|
|
onChange={onChange}
|
|
startDate={startDate}
|
|
endDate={endDate}
|
|
selectsRange
|
|
inline
|
|
/>
|
|
)
|
|
}
|