Skip to content

Commit

Permalink
docs: Fix links to other component props
Browse files Browse the repository at this point in the history
Previously if you were on another version of the docs and you clicked on a link to take you to another component's props, it would always take you to the latest version released.

This commit fixes this so that links clicked stay on the current version you're browsing.

Also fixes lint-staged prettier task to add the files to git.
  • Loading branch information
iRoachie committed Aug 3, 2019
1 parent f7307eb commit 72b5b75
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 129 deletions.
6 changes: 3 additions & 3 deletions docs/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ Styling for outer container

Icon props to be user for edit button

| Type | Default |
| :-----------------------------------------------------------------: | :---------------------------------------------------------------------------: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)} | { name: 'mode-edit', type: 'material', color: '#fff', underlayColor: '#000' } |
| Type | Default |
| :------------------------------: | :---------------------------------------------------------------------------: |
| {[...Icon props](icon.md#props)} | { name: 'mode-edit', type: 'material', color: '#fff', underlayColor: '#000' } |

---

Expand Down
6 changes: 3 additions & 3 deletions docs/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ style of the title when disabled
displays a centered icon (when no title) or to the left (with text). (can be
used along with iconRight as well). Can be an object or a custom component.

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand Down
18 changes: 9 additions & 9 deletions docs/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,29 +172,29 @@ styling for backgroundImage in the main container

define your left component here

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](/react-native-elements/docs/icon.html#icon-props)} <br/>**OR**<br/> React element or component | none |
| Type | Default |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](icon.md#props)} <br/>**OR**<br/> React element or component | none |

---

### `centerComponent`

define your center component here

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](/react-native-elements/docs/icon.html#icon-props)} <br/>**OR**<br/> React element or component | none |
| Type | Default |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](icon.md#props)} <br/>**OR**<br/> React element or component | none |

---

### `rightComponent`

define your right component here

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](/react-native-elements/docs/icon.html#icon-props)} <br/>**OR**<br/> React element or component | none |
| Type | Default |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: |
| { text: string, [...Text props](https://facebook.github.io/react-native/docs/text.html#props)}<br/>**OR**<br/>{ icon: string, [...Icon props](icon.md#props)} <br/>**OR**<br/> React element or component | none |

---

Expand Down
12 changes: 6 additions & 6 deletions docs/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ label or React Component used instead of simple string in `label` prop

displays an icon on the left (optional)

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand All @@ -229,9 +229,9 @@ styling for left Icon Component container

displays an icon on the right (optional)

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand Down
60 changes: 30 additions & 30 deletions docs/listitem.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,19 +325,19 @@ additional wrapper styling (right title and subtitle container)

set it to true or custom icon props if you want a chevron (optional)

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------: | :-----: |
| boolean **OR** {[...Icon props](/react-native-elements/docs/icon.html#icon-props)} **OR** React element or component | none |
| Type | Default |
| :-------------------------------------------------------------------------------: | :-----: |
| boolean **OR** {[...Icon props](icon.md#props)} **OR** React element or component | none |

---

### `checkmark`

set it to true or custom icon props if you want a checkmark (optional)

| Type | Default |
| :------------------------------------------------------------------------------------------------------------------: | :-----: |
| boolean **OR** {[...Icon props](/react-native-elements/docs/icon.html#icon-props)} **OR** React element or component | none |
| Type | Default |
| :-------------------------------------------------------------------------------: | :-----: |
| boolean **OR** {[...Icon props](icon.md#props)} **OR** React element or component | none |

---

Expand Down Expand Up @@ -485,39 +485,39 @@ provide all props from react-native Text component

displays an icon on the left (optional)

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :----------------------------------------------------------: | :-----: |
| {[...Icon props](icon.html#props)}<br/>**OR**<br/> component | none |

---

### `rightIcon`

displays an icon on the right (optional)

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

### `leftAvatar`

displays an Avatar on the left (optional)

| Type | Default |
| :-------------------------------------------------------------------------------------------------: | :-----: |
| {[...Avatar props](/react-native-elements/docs/avatar.html#avatar-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :------------------------------------------------------------: | :-----: |
| {[...Avatar props](avatar.md#props)}<br/>**OR**<br/> component | none |

---

### `rightAvatar`

displays an Avatar on the right (optional)

| Type | Default |
| :--------------------------------------------------------------------------------------------------------------------: | :-----: |
| View style (object){[...Avatar props](/react-native-elements/docs/avatar.html#avatar-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :-------------------------------------------------------------------------------: | :-----: |
| View style (object){[...Avatar props](avatar.md#props)}<br/>**OR**<br/> component | none |

---

Expand Down Expand Up @@ -557,9 +557,9 @@ add a switch to the right side. (object with the props of the react-native
add an Input on the right side (object with the props of the React Native
Elements `Input` component)

| Type | Default |
| :--------------------------------------------------------------------: | :-----: |
| {[...Input props](/react-native-elements/docs/input.html#input-props)} | none |
| Type | Default |
| :--------------------------------: | :-----: |
| {[...Input props](input.md#props)} | none |

---

Expand All @@ -568,9 +568,9 @@ Elements `Input` component)
add a button group on the right side (object with the props of the React Native
Elements `ButtonGroup` component)

| Type | Default |
| :---------------------------------------------------------------------------------------: | :-----: |
| {[...ButtonGroup props](/react-native-elements/docs/button_group.html#buttongroup-props)} | none |
| Type | Default |
| :---------------------------------------------: | :-----: |
| {[...ButtonGroup props](button_group.md#props)} | none |

---

Expand All @@ -579,9 +579,9 @@ Elements `ButtonGroup` component)
add a checkbox on the right side (object with the props of the React Native
Elements `CheckBox` component)

| Type | Default |
| :-----------------------------------------------------------------------------: | :-----: |
| {[...CheckBox props](/react-native-elements/docs/checkbox.html#checkbox-props)} | none |
| Type | Default |
| :--------------------------------------: | :-----: |
| {[...CheckBox props](checkbox.md#props)} | none |

---

Expand All @@ -590,9 +590,9 @@ Elements `CheckBox` component)
add a badge on the right side (object with the props of the React Native
Elements `Badge` component)

| Type | Default |
| :--------------------------------------------------------------------: | :-----: |
| {[...Badge props](/react-native-elements/docs/badge.html#badge-props)} | none |
| Type | Default |
| :--------------------------------: | :-----: |
| {[...Badge props](badge.md#props)} | none |

---

Expand Down
20 changes: 10 additions & 10 deletions docs/searchbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class App extends React.Component {
## Props

> This component inherits all
> [React Native Elements Input props](/react-native-elements/docs/input.html#props),
> [React Native Elements Input props](input.md#props),
> which means
> [all native TextInput props that come with a standard React Native TextInput element](https://facebook.github.io/react-native/docs/textinput.html),
> along with the following:
Expand Down Expand Up @@ -101,9 +101,9 @@ choose the look and feel of the search bar. One of "default", "ios", "android"
This props allows to override the `Icon` props or use a custom component. Use
`null` or `false` to hide the icon.

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand All @@ -112,9 +112,9 @@ This props allows to override the `Icon` props or use a custom component. Use
This props allows to override the `Icon` props or use a custom component. Use
`null` or `false` to hide the icon.

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand All @@ -123,9 +123,9 @@ This props allows to override the `Icon` props or use a custom component. Use
This props allows to override the `Icon` props or use a custom component. Use
`null` or `false` to hide the icon.

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
"git add"
],
"**/*.md": [
"prettier --single-quote --trailing-comma=es5 --write"
"prettier --single-quote --trailing-comma=es5 --write",
"git add"
]
},
"directories": {
Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-1.0.0/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ Styling for outer container

Icon props to be user for edit button

| Type | Default |
| :-----------------------------------------------------------------: | :---------------------------------------------------------------------------: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)} | { name: 'mode-edit', type: 'material', color: '#fff', underlayColor: '#000' } |
| Type | Default |
| :------------------------------: | :---------------------------------------------------------------------------: |
| {[...Icon props](icon.md#props)} | { name: 'mode-edit', type: 'material', color: '#fff', underlayColor: '#000' } |

---

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-1.0.0/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ style of the title when disabled
displays a centered icon (when no title) or to the left (with text). (can be
used along with iconRight as well). Can be an object or a custom component.

| Type | Default |
| :-------------------------------------------------------------------------------------------: | :-----: |
| {[...Icon props](/react-native-elements/docs/icon.html#icon-props)}<br/>**OR**<br/> component | none |
| Type | Default |
| :--------------------------------------------------------: | :-----: |
| {[...Icon props](icon.md#props)}<br/>**OR**<br/> component | none |

---

Expand Down
Loading

0 comments on commit 72b5b75

Please sign in to comment.