Skip to content

Commit 3edf4a1

Browse files
committed
Merge pull request react-bootstrap#1337 from AlexKVal/fix-images
Fix eslint warnings and move 'Images' up before 'Thumbnail'
2 parents 98ff359 + e76c192 commit 3edf4a1

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

docs/src/ComponentsPage.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,22 @@ const ComponentsPage = React.createClass({
675675
<PropTable component="Col"/>
676676
</div>
677677

678+
{/* Images */}
679+
<div className="bs-docs-section">
680+
<h1 className="page-header"><Anchor id="images">Images</Anchor></h1>
681+
682+
<h3><Anchor id="image-shape">Shape</Anchor></h3>
683+
<p>Use the <code>rounded</code>, <code>circle</code> and <code>thumbnail</code> props to customise the image.</p>
684+
<ReactPlayground codeText={Samples.ImageShape} />
685+
686+
<h3><Anchor id="image-responsive">Responsive</Anchor></h3>
687+
<p>Use the <code>responsive</code> to scale image nicely to the parent element.</p>
688+
<ReactPlayground codeText={Samples.ImageResponsive} />
689+
690+
<h3><Anchor id="image-props">Props</Anchor></h3>
691+
<PropTable component="Image"/>
692+
</div>
693+
678694
{/* Thumbnail */}
679695
<div className="bs-docs-section">
680696
<h1 className="page-header"><Anchor id="thumbnail">Thumbnail</Anchor></h1>
@@ -904,22 +920,6 @@ const ComponentsPage = React.createClass({
904920
<h4><Anchor id="utilities-fade-props">Props</Anchor></h4>
905921
<PropTable component="Fade"/>
906922
</div>
907-
908-
{/* Images */}
909-
<div className="bs-docs-section">
910-
<h1 className="page-header"><Anchor id="images">Images</Anchor></h1>
911-
912-
<h3><Anchor id="image-shape">Shape</Anchor></h3>
913-
<p>Use the <code>rounded</code>, <code>circle</code> and <code>thumbnail</code> props to customise the image.</p>
914-
<ReactPlayground codeText={Samples.ImageShape} />
915-
916-
<h3><Anchor id="image-responsive">Responsive</Anchor></h3>
917-
<p>Use the <code>responsive</code> to scale image nicely to the parent element.</p>
918-
<ReactPlayground codeText={Samples.ImageResponsive} />
919-
920-
<h3><Anchor id="image-props">Props</Anchor></h3>
921-
<PropTable component="Image"/>
922-
</div>
923923
</div>
924924

925925

@@ -953,6 +953,7 @@ const ComponentsPage = React.createClass({
953953
<NavItem href="#alerts" key={14}>Alerts</NavItem>
954954
<NavItem href="#carousels" key={15}>Carousels</NavItem>
955955
<NavItem href="#grids" key={16}>Grids</NavItem>
956+
<NavItem href="#images" key={29}>Images</NavItem>
956957
<NavItem href="#thumbnail" key={17}>Thumbnail</NavItem>
957958
<NavItem href="#listgroup" key={18}>List group</NavItem>
958959
<NavItem href="#labels" key={19}>Labels</NavItem>
@@ -964,7 +965,6 @@ const ComponentsPage = React.createClass({
964965
<NavItem href="#tables" key={25}>Tables</NavItem>
965966
<NavItem href="#input" key={26}>Input</NavItem>
966967
<NavItem href="#utilities" key={28}>Utilities</NavItem>
967-
<NavItem href="#images" key={29}>Images</NavItem>
968968
</Nav>
969969
<a className="back-to-top" href="#top">
970970
Back to top

test/ImageSpec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react';
22
import ReactTestUtils from 'react/lib/ReactTestUtils';
33
import Image from '../src/Image';
44

5-
describe('Image', function() {
5+
describe('Image', () => {
66

7-
it('should be an image', function() {
7+
it('should be an image', () => {
88
let instance = ReactTestUtils.renderIntoDocument(
99
<Image />
1010
);
@@ -13,7 +13,7 @@ describe('Image', function() {
1313
image.nodeName.should.equal('IMG');
1414
});
1515

16-
it('should provide src and alt prop', function() {
16+
it('should provide src and alt prop', () => {
1717
let instance = ReactTestUtils.renderIntoDocument(
1818
<Image src="image.jpg" alt="this is alt" />
1919
);
@@ -23,7 +23,7 @@ describe('Image', function() {
2323
assert.equal(image.getAttribute('alt'), 'this is alt');
2424
});
2525

26-
it('should have correct class when responsive prop is set', function() {
26+
it('should have correct class when responsive prop is set', () => {
2727
let instance = ReactTestUtils.renderIntoDocument(
2828
<Image responsive />
2929
);
@@ -32,7 +32,7 @@ describe('Image', function() {
3232
imageClassName.should.match(/\bimg-responsive\b/);
3333
});
3434

35-
it('should have correct class when rounded prop is set', function() {
35+
it('should have correct class when rounded prop is set', () => {
3636
let instance = ReactTestUtils.renderIntoDocument(
3737
<Image rounded />
3838
);
@@ -41,7 +41,7 @@ describe('Image', function() {
4141
imageClassName.should.match(/\bimg-rounded\b/);
4242
});
4343

44-
it('should have correct class when circle prop is set', function() {
44+
it('should have correct class when circle prop is set', () => {
4545
let instance = ReactTestUtils.renderIntoDocument(
4646
<Image circle />
4747
);
@@ -50,7 +50,7 @@ describe('Image', function() {
5050
imageClassName.should.match(/\bimg-circle\b/);
5151
});
5252

53-
it('should have correct class when thumbnail prop is set', function() {
53+
it('should have correct class when thumbnail prop is set', () => {
5454
let instance = ReactTestUtils.renderIntoDocument(
5555
<Image thumbnail />
5656
);

0 commit comments

Comments
 (0)