Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) feat/calendar #2647

Open
wants to merge 15 commits into
base: patch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions example/storybook-nativewind/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ module.exports = function (api) {
__dirname,
'../../packages/unstyled/image-viewer/src'
),
'@gluestack-ui/calendar': path.resolve(
__dirname,
'../../packages/unstyled/calendar/src'
),
'@gluestack-ui/tooltip': path.resolve(
__dirname,
'../../packages/unstyled/tooltip/src'
Expand Down
40 changes: 40 additions & 0 deletions example/storybook-nativewind/src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import {
Calendar,
CalendarContent,
CalendarDays,
CalendarWeek,
CalendarHeader,
CalendarHeaderNext,
CalendarHeaderPrev,
CalendarHeaderTitle,
} from '@/components/ui/calendar';

const CalendarBasic = ({ ...props }: any) => {
return (
<Calendar
{...props}
value={new Date()}
className="w-72"
minDate={new Date(2024, 5, 1)}
maxDate={new Date(2025, 1, 15)}
>
<CalendarHeader>
<CalendarHeaderPrev />
<CalendarHeaderTitle />
<CalendarHeaderNext />
</CalendarHeader>
<CalendarContent>
<CalendarWeek />
<CalendarDays />
</CalendarContent>
</Calendar>
);
};

CalendarBasic.description =
'This is a basic Calendar component example. The Calendar component lets you quickly and easily add status indicators to your interface for improved usability. They are designed to be attention-grabbing and quickly convey important information.';

export default CalendarBasic;

export { Calendar };
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { ComponentMeta } from '@storybook/react-native';
import Calendar from './Calendar';

const CalendarMeta: ComponentMeta<typeof Calendar> = {
title: 'stories/Calendar',
component: Calendar,
// @ts-ignore
metaInfo: {
componentDescription:
'A calendar component that allows users to select dates and navigate between months.',
},
args: {},
argTypes: {},
};

export default CalendarMeta;

export { Calendar };
Loading