Skip to content

Commit

Permalink
Merge pull request #2051 from damonbauer/feature/source-links-in-docs
Browse files Browse the repository at this point in the history
Adds source links to each example
  • Loading branch information
JedWatson authored Oct 18, 2017
2 parents fc67db8 + 3711101 commit 0793484
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/src/components/BooleanSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var ValuesAsBooleansField = createClass({
render () {
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/BooleanSelect.js">(Source)</a></h3>
<Select
onChange={this.onChange}
options={this.state.options}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/Contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Contributors = createClass({
render () {
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/Contributors.js">(Source)</a></h3>
<Select.Async multi={this.state.multi} value={this.state.value} onChange={this.onChange} onValueClick={this.gotoContributor} valueKey="github" labelKey="name" loadOptions={this.getContributors} />
<div className="checkbox-list">
<label className="checkbox">
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/Creatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var CreatableDemo = createClass({
const { multi, multiValue, options, value } = this.state;
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/Creatable.js">(Source)</a></h3>
<Select.Creatable
multi={multi}
options={options}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/CustomComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const UsersField = createClass({

return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/CustomComponents.js">(Source)</a></h3>
<Select
arrowRenderer={arrowRenderer}
onChange={this.setValue}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/CustomRender.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var DisabledUpsellOptions = createClass({
];
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/CustomRender.js">(Source)</a></h3>
<Select
onInputChange={(inputValue) => this._inputValue = inputValue}
options={options}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/GithubUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const GithubUsers = createClass({

return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/GithubUsers.js">(Source)</a></h3>
<AsyncComponent multi={this.state.multi} value={this.state.value} onChange={this.onChange} onValueClick={this.gotoUser} valueKey="id" labelKey="login" loadOptions={this.getUsers} backspaceRemoves={this.state.backspaceRemoves} />
<div className="checkbox-list">
<label className="checkbox">
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/Multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var MultiSelectField = createClass({
const options = crazy ? WHY_WOULD_YOU : FLAVOURS;
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/Multiselect.js">(Source)</a></h3>
<Select
closeOnSelect={!stayOpen}
disabled={disabled}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/NumericSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var ValuesAsNumbersField = createClass({
}
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/NumericSelect.js">(Source)</a></h3>
<Select
matchPos={this.state.matchPos}
matchProp={matchProp}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/States.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var StatesField = createClass({
var options = STATES[this.state.country];
return (
<div className="section">
<h3 className="section-heading">{this.props.label}</h3>
<h3 className="section-heading">{this.props.label} <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/States.js">(Source)</a></h3>
<Select ref="stateSelect" autoFocus options={options} simpleValue clearable={this.state.clearable} name="selected-state" disabled={this.state.disabled} value={this.state.selectValue} onChange={this.updateValue} searchable={this.state.searchable} />

<div style={{ marginTop: 14 }}>
Expand Down
2 changes: 1 addition & 1 deletion examples/src/components/Virtualized.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var CitiesField = createClass({
var options = DATA.CITIES;
return (
<div className="section">
<h3 className="section-heading">Cities (Large Dataset)</h3>
<h3 className="section-heading">Cities (Large Dataset) <a href="https://github.com/JedWatson/react-select/tree/master/examples/src/components/Virtualized.js">(Source)</a></h3>
<VirtualizedSelect ref="citySelect"
options={options}
simpleValue
Expand Down

0 comments on commit 0793484

Please sign in to comment.