Skip to content

Commit a4c065e

Browse files
committedJul 8, 2015
[added] links to every component / example on Components page
1 parent 00fd4d6 commit a4c065e

File tree

3 files changed

+232
-194
lines changed

3 files changed

+232
-194
lines changed
 

‎docs/assets/style.css

+22
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,25 @@ body {
172172
margin: 5px 10px;
173173

174174
}
175+
176+
.anchor,
177+
.anchor:hover,
178+
.anchor:active,
179+
.anchor:focus {
180+
color: black;
181+
text-decoration: none;
182+
position: relative;
183+
}
184+
.anchor-icon {
185+
font-size: 90%;
186+
padding-top: 0.1em;
187+
position: absolute;
188+
left: -0.8em;
189+
opacity: 0;
190+
}
191+
h1:hover .anchor-icon,
192+
h2:hover .anchor-icon,
193+
h3:hover .anchor-icon,
194+
h4:hover .anchor-icon {
195+
opacity: 0.5;
196+
}

‎docs/src/Anchor.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from 'react';
2+
3+
const Anchor = React.createClass({
4+
propTypes: {
5+
id: React.PropTypes.string
6+
},
7+
render() {
8+
return (
9+
<a id={this.props.id} href={'#' + this.props.id} className='anchor'>
10+
<span className='anchor-icon'>#</span>
11+
{this.props.children}
12+
</a>
13+
);
14+
}
15+
});
16+
17+
export default Anchor;

‎docs/src/ComponentsPage.js

+193-194
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.