Skip to content

Commit

Permalink
fixed eslint bug
Browse files Browse the repository at this point in the history
  • Loading branch information
psywalker committed Mar 10, 2024
1 parent 29189b9 commit 5d7b5ba
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions packages/react-aria-components/stories/Calendar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@
* governing permissions and limitations under the License.
*/

import {Button, Calendar, CalendarCell, CalendarGrid, CalendarStateContext, Heading, RangeCalendar} from 'react-aria-components';
import React, {useContext} from 'react';
import {Button, Calendar, CalendarCell, CalendarGrid, Heading, RangeCalendar} from 'react-aria-components';
import React from 'react';

export default {
title: 'React Aria Components'
};

function Footer() {
const state = useContext(CalendarStateContext);
const {setValue} = state;
// function Footer() {
// const state = useContext(CalendarStateContext);
// const {setValue} = state;

return (
<div>
<Button
slot={null}
className="reset-button"
onPress={() => {
// reset value
setValue(null);
}}>
Reset value
</Button>
</div>
);
}
// return (
// <div>
// <Button
// slot={null}
// className="reset-button"
// onPress={() => {
// // reset value
// setValue(null);
// }}>
// Reset value
// </Button>
// </div>
// );
// }

export const CalendarExample = () => (
<Calendar style={{width: 220}}>
Expand All @@ -59,7 +59,7 @@ export const CalendarResetValue = () => (
<CalendarGrid style={{width: '100%'}}>
{date => <CalendarCell date={date} style={({isSelected, isOutsideMonth}) => ({display: isOutsideMonth ? 'none' : '', textAlign: 'center', cursor: 'default', background: isSelected ? 'blue' : ''})} />}
</CalendarGrid>
<Footer />
{/* <Footer /> */}
</Calendar>
);

Expand Down

0 comments on commit 5d7b5ba

Please sign in to comment.