Skip to content

Commit f80c3a0

Browse files
committed
Add "note" to buid-docs
1 parent cd982bf commit f80c3a0

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

docsRNC/docs/AgendaList.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
Agenda list component
1+
Agenda list component for the `ExpandableCalendar` component.
22
[(code example)](https://github.com/wix/react-native-calendars/blob/master/example/src/screens/expandableCalendar.tsx)
33
:::info
44
This component extends **[FlatList](https://reactnative.dev/docs/flatlist)** props.
55
:::
6+
**NOTE: This component should be wrapped with `CalendarProvider` component.**
67

78
<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}></div>
89

docsRNC/docs/ExpandableCalendar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Expandable calendar component
33
:::info
44
This component extends **[CalendarList](https://github.com/wix/react-native-calendars/blob/master/src/calendar-list/index.tsx)** props.
55
:::
6+
**NOTE: This component should be wrapped with `CalendarProvider` component.**
67

78
<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}></div>
89

scripts/build-docs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,19 @@ if (components) {
2828
if (component.extendsLink) {
2929
extendsText = `[${extendsText}](${component.extendsLink})`;
3030
} else {
31-
const extendedComponentName = _.last(_.split(extendsText, '/')); // Incubator/TextField -> TextField
31+
const extendedComponentName = _.last(_.split(extendsText, '/'));
3232
extendsText = `[${extendedComponentName}](/docs/${extendsText})`;
3333
}
3434
content += `:::info\n`;
3535
content += `This component extends **${extendsText}** props.\n`;
3636
content += `:::\n`;
3737
}
3838

39+
if (component.note) {
40+
const noteText = component.note;
41+
content += `**NOTE: ${noteText}**\n`;
42+
}
43+
3944
/* Images */
4045
content += `<div style={{display: 'flex', flexDirection: 'row', overflowX: 'auto', maxHeight: '500px', alignItems: 'center'}}>`;
4146
component.images?.forEach(image => {

src/expandableCalendar/agendaList.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "AgendaList",
3-
"description": "Agenda list component",
3+
"description": "Agenda list component for the `ExpandableCalendar` component.",
4+
"note": "This component should be wrapped with `CalendarProvider` component.",
45
"images": [
56
],
67
"extends": ["FlatList"],

src/expandableCalendar/expandableCalendar.api.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "ExpandableCalendar",
33
"description": "Expandable calendar component",
4+
"note": "This component should be wrapped with `CalendarProvider` component.",
45
"images": [
56
],
67
"extends": ["CalendarList"],

0 commit comments

Comments
 (0)