Skip to content

Commit 7537375

Browse files
authored
Merge pull request #1743 from wix/infra/Docs_site
Infra/docs site
2 parents 102e48b + 09a84ff commit 7537375

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2011
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ yarn.lock
55
.vscode
66
package-lock.json
77

8-
98
# OSX
109
#
1110
.DS_Store

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ test/
252252
ios/
253253
android/
254254
demo/
255+
docsRNC/
255256
.babelrc
256257
# eslint-rules/
257258
scripts/

docsRNC/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docsRNC/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docsRNC/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')]
3+
};

docsRNC/docs/Agenda.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Agenda component
2+
[(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/agenda.tsx)
3+
:::info
4+
This component extends **[CalendarList, FlatList](https://github.com/wix/react-native-calendars/blob/master/src/calendar-list/index.tsx,https://reactnative.dev/docs/flatlist)** props.
5+
:::
6+
7+
<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}><img style={{maxHeight: '420px'}} src={'https://github.com/wix/react-native-calendars/blob/master/demo/assets/agenda.gif?raw=true'}/>
8+
9+
</div>
10+
11+
## API
12+
13+
### items
14+
15+
the list of items that have to be displayed in agenda. If you want to render item as empty date the value of date key has to be an empty array []. If there exists no value for date key it is considered that the date in question is not yet loaded
16+
<span style={{color: 'grey'}}>AgendaSchedule</span>
17+
18+
### loadItemsForMonth
19+
20+
Handler which gets executed when items for a certain month should be loaded (month became visible)
21+
<span style={{color: 'grey'}}>(data: DateData) => void</span>
22+
23+
### onDayChange
24+
25+
Handler which gets executed when day changes while scrolling agenda list
26+
<span style={{color: 'grey'}}>(data: DateData) => void</span>
27+
28+
### onCalendarToggled
29+
30+
Handler which gets executed when the calendar is opened or closed
31+
<span style={{color: 'grey'}}>(enabled: boolean) => void</span>
32+
33+
### selected
34+
35+
initially selected day
36+
<span style={{color: 'grey'}}>string</span>
37+
38+
### renderKnob
39+
40+
Replace default agenda's knob with a custom one
41+
<span style={{color: 'grey'}}>() => JSX.Element</span>
42+
43+
### hideKnob
44+
45+
Whether to hide the knob
46+
<span style={{color: 'grey'}}>boolean</span>
47+
48+
### showClosingKnob
49+
50+
Whether the knob should always be visible (when hideKnob = false)
51+
<span style={{color: 'grey'}}>boolean</span>
52+
53+
### showOnlySelectedDayItems
54+
55+
Whether to show items only for the selected date
56+
<span style={{color: 'grey'}}>boolean</span>
57+
58+
### renderEmptyData
59+
60+
Replace default ActivityIndicator with a custom one
61+
<span style={{color: 'grey'}}>() => JSX.Element</span>

docsRNC/docs/AgendaList.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Agenda list component
2+
[(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendar.tsx)
3+
:::info
4+
This component extends **[FlatList](https://reactnative.dev/docs/flatlist)** props.
5+
:::
6+
7+
<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}></div>
8+
9+
## API
10+
11+
### theme
12+
13+
Specify theme properties to override specific styles for calendar parts
14+
<span style={{color: 'grey'}}>Theme</span>
15+
16+
### dayFormat
17+
18+
Day format in section title. Formatting values: http://arshaw.com/xdate/#Formatting
19+
<span style={{color: 'grey'}}>string</span>
20+
21+
### dayFormatter
22+
23+
A function to custom format the section header's title
24+
<span style={{color: 'grey'}}>(arg0: string) => string</span>
25+
26+
### useMoment
27+
28+
Whether to use moment.js for date string formatting
29+
<span style={{color: 'grey'}}>boolean</span>
30+
31+
### markToday
32+
33+
Whether to mark today's title with the 'Today, ...' string
34+
<span style={{color: 'grey'}}>boolean</span>
35+
36+
### avoidDateUpdates
37+
38+
Whether to block the date change in calendar (and calendar context provider) when agenda scrolls
39+
<span style={{color: 'grey'}}>boolean</span>
40+
41+
### scrollToNextEvent
42+
43+
Whether to enable scrolling the agenda list to the next date with content when pressing a day without content
44+
<span style={{color: 'grey'}}>boolean</span>
45+
46+
### viewOffset
47+
48+
Offset scroll to the section
49+
<span style={{color: 'grey'}}>number</span>
50+
51+
### sectionStyle
52+
53+
The style passed to the section view
54+
<span style={{color: 'grey'}}>ViewStyle</span>

docsRNC/docs/Calendar.md

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
Calendar component
2+
[(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/calendars.tsx)
3+
:::info
4+
This component extends **[CalendarHeader, BasicDay](https://github.com/wix/react-native-calendars/blob/master/src/calendar/header/index.tsx,https://github.com/wix/react-native-calendars/blob/master/src/calendar/day/basic/index.tsx)** props.
5+
:::
6+
7+
<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}><img style={{maxHeight: '420px'}} src={'https://github.com/wix/react-native-calendars/blob/master/demo/assets/calendar.gif?raw=true'}/>
8+
9+
</div>
10+
11+
## API
12+
13+
### theme
14+
15+
Specify theme properties to override specific styles for calendar parts
16+
<span style={{color: 'grey'}}>Theme</span>
17+
18+
### style
19+
20+
Specify style for calendar container element
21+
<span style={{color: 'grey'}}>ViewStyle</span>
22+
23+
### headerStyle
24+
25+
Specify style for calendar header
26+
<span style={{color: 'grey'}}>ViewStyle</span>
27+
28+
### customHeader
29+
30+
Allow rendering a totally custom header
31+
<span style={{color: 'grey'}}>any</span>
32+
33+
### initialDate
34+
35+
Initially visible month
36+
<span style={{color: 'grey'}}>string</span>
37+
38+
### minDate
39+
40+
Minimum date that can be selected, dates before minDate will be grayed out
41+
<span style={{color: 'grey'}}>string</span>
42+
43+
### maxDate
44+
45+
Maximum date that can be selected, dates after maxDate will be grayed out
46+
<span style={{color: 'grey'}}>string</span>
47+
48+
### firstDay
49+
50+
If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday
51+
<span style={{color: 'grey'}}>number</span>
52+
53+
### markedDates
54+
55+
Collection of dates that have to be marked
56+
<span style={{color: 'grey'}}>MarkedDatesType</span>
57+
58+
### displayLoadingIndicator
59+
60+
Whether to display loading indicator
61+
<span style={{color: 'grey'}}>boolean</span>
62+
63+
### showWeekNumbers
64+
65+
Whether to show weeks numbers
66+
<span style={{color: 'grey'}}>boolean</span>
67+
68+
### hideExtraDays
69+
70+
Whether to hide days of other months in the month page
71+
<span style={{color: 'grey'}}>boolean</span>
72+
73+
### showSixWeeks
74+
75+
Whether to always show six weeks on each month (when hideExtraDays = false)
76+
<span style={{color: 'grey'}}>boolean</span>
77+
78+
### disableMonthChange
79+
80+
Whether to disable changing month when click on days of other months (when hideExtraDays is false)
81+
<span style={{color: 'grey'}}>boolean</span>
82+
83+
### enableSwipeMonths
84+
85+
Whether to enable the option to swipe between months
86+
<span style={{color: 'grey'}}>boolean</span>
87+
88+
### disabledByDefault
89+
90+
Whether to disable days by default
91+
<span style={{color: 'grey'}}>boolean</span>
92+
93+
### allowSelectionOutOfRange
94+
95+
Whether to allow selection of dates before minDate or after maxDate
96+
<span style={{color: 'grey'}}>boolean</span>
97+
98+
### onDayPress
99+
100+
Handler which gets executed on day press
101+
<span style={{color: 'grey'}}>(date: DateData) => void</span>
102+
103+
### onDayLongPress
104+
105+
Handler which gets executed on day long press
106+
<span style={{color: 'grey'}}>(date: DateData) => void</span>
107+
108+
### onMonthChange
109+
110+
Handler which gets executed when month changes in calendar
111+
<span style={{color: 'grey'}}>(date: DateData) => void</span>
112+
113+
### onVisibleMonthsChange
114+
115+
Handler which gets executed when visible month changes in calendar
116+
<span style={{color: 'grey'}}>(months: DateData[]) => void</span>
117+
118+
### monthFormat
119+
120+
Month format for the header's title. Formatting values: http://arshaw.com/xdate/#Formatting
121+
<span style={{color: 'grey'}}>string</span>
122+
123+
### hideDayNames
124+
125+
Whether to hide the days names
126+
<span style={{color: 'grey'}}>boolean</span>
127+
128+
### hideArrows
129+
130+
Whether to hide the arrows
131+
<span style={{color: 'grey'}}>boolean</span>
132+
133+
### disableArrowLeft
134+
135+
Whether to disable the left arrow
136+
<span style={{color: 'grey'}}>boolean</span>
137+
138+
### disableArrowRight
139+
140+
Whether to disable the right arrow
141+
<span style={{color: 'grey'}}>boolean</span>
142+
143+
### renderArrow
144+
145+
Replace default arrows with custom ones (direction: 'left' | 'right')
146+
<span style={{color: 'grey'}}>(direction: Direction) => ReactNode</span>
147+
148+
### onPressArrowLeft
149+
150+
Handler which gets executed when press left arrow. It receive a callback to go to the previous month
151+
<span style={{color: 'grey'}}>(method: () => void, month?: string) => void</span>
152+
153+
### onPressArrowRight
154+
155+
Handler which gets executed when press right arrow. It receive a callback to go to the next month
156+
<span style={{color: 'grey'}}>(method: () => void, month?: string) => void</span>
157+
158+
### disabledDaysIndexes
159+
160+
Whether to apply custom disable color to selected day indexes
161+
<span style={{color: 'grey'}}>number[]</span>
162+
163+
### renderHeader
164+
165+
Replace default title with custom one
166+
<span style={{color: 'grey'}}>(date?: string) => ReactNode</span>
167+
168+
### customHeaderTitle
169+
170+
Replace default title with custom element
171+
<span style={{color: 'grey'}}>JSX.Element</span>
172+
173+
### dayComponent
174+
175+
Replace default day with custom day rendering component
176+
<span style={{color: 'grey'}}>JSX.Element</span>
177+
178+
### disableAllTouchEventsForDisabledDays
179+
180+
Whether to disable all touch events for disabled days (can be override with 'disableTouchEvent' in 'markedDates')
181+
<span style={{color: 'grey'}}>boolean</span>
182+
183+
### disableAllTouchEventsForInactiveDays
184+
185+
Whether to disable all touch events for inactive days (can be override with 'disableTouchEvent' in 'markedDates')
186+
<span style={{color: 'grey'}}>boolean</span>

0 commit comments

Comments
 (0)