Skip to content

Commit c7af287

Browse files
authored
bootstrap 4 buttons (#51)
1 parent e9448c6 commit c7af287

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

templates/react/components/foo/Create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Create extends Component {
2828
{this.props.error && <div className="alert alert-danger" role="alert"><span className="fa fa-exclamation-triangle" aria-hidden="true"></span> {this.props.error}</div>}
2929

3030
<Form onSubmit={this.props.create} values={this.props.item}/>
31-
<Link to="." className="btn btn-default">Back to list</Link>
31+
<Link to="." className="btn btn-primary">Back to list</Link>
3232
</div>;
3333
}
3434
}

templates/react/components/foo/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Form extends Component {
3030
<Field component={this.renderField} name="{{{ name }}}" type="{{{ type }}}"{{#if step}} step="{{{ step }}}"{{/if}} placeholder="{{{ description }}}" {{#if required}}required={true}{{/if}}/>
3131
{{/each}}
3232

33-
<button type="submit" className="btn btn-primary">Submit</button>
33+
<button type="submit" className="btn btn-success">Submit</button>
3434
</form>;
3535
}
3636
}

templates/react/components/foo/List.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class List extends Component {
3636
{this.props.deletedItem && <div className="alert alert-success">{this.props.deletedItem['@id']} deleted.</div>}
3737
{this.props.error && <div className="alert alert-danger">{this.props.error}</div>}
3838

39-
<p><Link to="create" className="btn btn-default">Create</Link></p>
39+
<p><Link to="create" className="btn btn-primary">Create</Link></p>
4040

4141
<table className="table table-responsive table-striped table-hover">
4242
<thead>
@@ -84,10 +84,10 @@ class List extends Component {
8484
const {'{{{ hydraPrefix }}}first': first, '{{{ hydraPrefix }}}previous': previous,'{{{ hydraPrefix }}}next': next, '{{{ hydraPrefix }}}last': last} = view;
8585

8686
return <nav aria-label="Page navigation">
87-
<Link to='.' className={`btn btn-default${previous ? '' : ' disabled'}`}><span aria-hidden="true">&lArr;</span> First</Link>
88-
<Link to={!previous || previous === first ? '.' : encodeURIComponent(previous)} className={`btn btn-default${previous ? '' : ' disabled'}`}><span aria-hidden="true">&larr;</span> Previous</Link>
89-
<Link to={next ? encodeURIComponent(next) : '#'} className={`btn btn-default${next ? '' : ' disabled'}`}>Next <span aria-hidden="true">&rarr;</span></Link>
90-
<Link to={last ? encodeURIComponent(last) : '#'} className={`btn btn-default${next ? '' : ' disabled'}`}>Last <span aria-hidden="true">&rArr;</span></Link>
87+
<Link to='.' className={`btn btn-primary${previous ? '' : ' disabled'}`}><span aria-hidden="true">&lArr;</span> First</Link>
88+
<Link to={!previous || previous === first ? '.' : encodeURIComponent(previous)} className={`btn btn-primary${previous ? '' : ' disabled'}`}><span aria-hidden="true">&larr;</span> Previous</Link>
89+
<Link to={next ? encodeURIComponent(next) : '#'} className={`btn btn-primary${next ? '' : ' disabled'}`}>Next <span aria-hidden="true">&rarr;</span></Link>
90+
<Link to={last ? encodeURIComponent(last) : '#'} className={`btn btn-primary${next ? '' : ' disabled'}`}>Last <span aria-hidden="true">&rArr;</span></Link>
9191
</nav>;
9292
}
9393
}

templates/react/components/foo/Show.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Show extends Component {
5959
</tbody>
6060
</table>
6161
}
62-
<Link to=".." className="btn btn-default">Back to list</Link>
62+
<Link to=".." className="btn btn-primary">Back to list</Link>
6363
{item && <Link to={`/{{ name }}/edit/${encodeURIComponent(item['@id'])}`}>
6464
<button className="btn btn-warning">Edit</button>
6565
</Link>

templates/react/components/foo/Update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Update extends Component {
5252
{this.props.deleteError && <div className="alert alert-danger" role="alert"><span className="fa fa-exclamation-triangle" aria-hidden="true"></span> {this.props.deleteError}</div>}
5353

5454
{item && <Form onSubmit={values => this.props.update(item, values)} initialValues={item}/>}
55-
<Link to=".." className="btn btn-default">Back to list</Link>
55+
<Link to=".." className="btn btn-primary">Back to list</Link>
5656
<button onClick={this.del} className="btn btn-danger">Delete</button>
5757
</div>;
5858
}

0 commit comments

Comments
 (0)