-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* convert EuiLink instances with intenal routing to react-router Link * convert react-router Link instances with external routing to EuiLink * convert faux links to use hash * Start to documentation guidelines: internal and external links * reinstate local relative url * update external link doc guidlines
- Loading branch information
1 parent
7ee0fc6
commit b7a7a22
Showing
9 changed files
with
86 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Documentation guidelines | ||
|
||
## Links | ||
|
||
### Linking between EUI doc pages/components | ||
|
||
In instances where you would like to provide a link to another EUI component | ||
referenced in a given component description or example, take advantage of `react-router`, | ||
which is used for routing in EUI docs. Aside from the benefit of shorter path names, `react-router` will take the environment into account and provide the correct URL for both development and production locations. | ||
|
||
#### Basic example: | ||
|
||
```js | ||
import { | ||
Link, | ||
} from 'react-router'; | ||
|
||
// ... | ||
|
||
Consult the larger <Link to="/guidelines/colors">color guidelines</Link> page | ||
for a better explanation about passing color contrast. | ||
``` | ||
|
||
### Linking to external resources | ||
|
||
When referring to external sites or resources, use EUI components that take an `href` prop, such as `EuiLink`. | ||
|
||
#### Basic example: | ||
|
||
```js | ||
import { | ||
EuiLink, | ||
} from '/src/components'; | ||
|
||
// ... | ||
|
||
<EuiLink href="https://github.com/elastic/eui/blob/master/src/global_styling/mixins/_shadow.scss">View the Sass code for shadow mixins</EuiLink>. | ||
``` |