Skip to content

Commit fec40b0

Browse files
committed
Fix new docs broken links
1 parent 00daf34 commit fec40b0

File tree

8 files changed

+10
-7
lines changed

8 files changed

+10
-7
lines changed

docs/foundation/modifiers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ The last type of modifiers is for styling your components
112112
```
113113

114114

115-
! all styling modifiers are based on our [`Colors` & `Typography` presets](/react-native-ui-lib/foundation/style).
115+
! all styling modifiers are based on our [`Colors` & `Typography` presets](/docs/foundation/style).
116116
You can load your own presets and use them as modifiers.
117117

118118

119119

120-
Check out [this example](/react-native-ui-lib/getting-started/usage) where we use most of these props.
120+
Check out [this example](/docs/getting-started/usage) where we use most of these props.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"docs:deploy": "(cd ./uilib-docs && gatsby build --prefix-paths && gh-pages -d public --branch gh-pages)",
3939
"docs:build": "(cd ./uilib-docs && npm install && gatsby build --prefix-paths && gh-pages -d public --branch gh-pages)",
4040
"docs:develop": "(cd ./uilib-docs && gatsby develop)",
41+
"build:docs": "node scripts/build-docs.js",
4142
"bump:patch": "npm version patch",
4243
"demo": "./scripts/demo.sh",
4344
"release": "node ./scripts/release.js",

scripts/build-docs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ components.forEach(component => {
4747
if (component.extendsLink) {
4848
extendsText = `[${extendsText}](${component.extendsLink})`;
4949
} else {
50-
extendsText = `[${extendsText}](${extendsText})`;
50+
const extendedComponentName = _.last(_.split(extendsText, '/')); // Incubator/TextField -> TextField
51+
extendsText = `[${extendedComponentName}](/docs/components/${extendsText})`;
5152
}
5253
content += `:::info\n`;
5354
content += `This component extends **${extendsText}** props.\n`;

src/components/maskedInput/maskedInput.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "MaskedInput",
33
"category": "form",
44
"description": "Mask Input to create custom looking inputs with custom formats",
5-
"extends": ["TextField"],
5+
"extends": ["TextInput"],
6+
"extendsLink": ["https://reactnative.dev/docs/textinput"],
67
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/MaskedInputScreen.js",
78
"images": [
89
"https://camo.githubusercontent.com/61eedb65e968845d5eac713dcd21a69691571fb1/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f4b5a5a7446666f486f454b334b2f67697068792e676966"

src/components/picker/api/picker.api.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"name": "Picker",
33
"category": "form",
44
"description": "Picker Component, support single or multiple selection, blurModel and native wheel picker",
5-
"extends": ["TextField"],
65
"modifiers": ["margin", "padding", "position"],
76
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/PickerScreen.js",
87
"images": [

src/components/progressiveImage/progressiveImage.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ProgressiveImage",
33
"category": "basic",
44
"description": "Image component that loads first a small thumbnail of the images, and fades-in the full-sized image with animation once it's loaded",
5-
"extends": ["AnimatedImage"],
5+
"extends": ["basic/AnimatedImage"],
66
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ProgressiveImageScreen.js",
77
"props": [
88
{

src/components/tabController/apis/pageCarousel.api.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "TabController's PageCarousel component",
55
"note": "You must pass `asCarousel` flag to TabController and render your TabPages inside a PageCarousel",
66
"extends": ["ScrollView"],
7+
"extendsLink": ["https://reactnative.dev/docs/scrollview"],
78
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/TabControllerScreen/index.tsx",
89
"images": []
910
}

src/incubator/ChipsInput/chipsInput.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ChipsInput",
33
"category": "incubator",
44
"description": "A chips input",
5-
"extends": ["TextField"],
5+
"extends": ["Incubator/TextField"],
66
"modifiers": ["margin", "color", "typography"],
77
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/incubatorScreens/IncubatorChipsInputScreen.tsx",
88
"images": [],

0 commit comments

Comments
 (0)