Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1337 from AlexKVal/fix-images
Browse files Browse the repository at this point in the history
Fix eslint warnings and move 'Images' up before 'Thumbnail'
  • Loading branch information
taion committed Sep 22, 2015
2 parents 98ff359 + e76c192 commit 3edf4a1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
34 changes: 17 additions & 17 deletions docs/src/ComponentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,22 @@ const ComponentsPage = React.createClass({
<PropTable component="Col"/>
</div>

{/* Images */}
<div className="bs-docs-section">
<h1 className="page-header"><Anchor id="images">Images</Anchor></h1>

<h3><Anchor id="image-shape">Shape</Anchor></h3>
<p>Use the <code>rounded</code>, <code>circle</code> and <code>thumbnail</code> props to customise the image.</p>
<ReactPlayground codeText={Samples.ImageShape} />

<h3><Anchor id="image-responsive">Responsive</Anchor></h3>
<p>Use the <code>responsive</code> to scale image nicely to the parent element.</p>
<ReactPlayground codeText={Samples.ImageResponsive} />

<h3><Anchor id="image-props">Props</Anchor></h3>
<PropTable component="Image"/>
</div>

{/* Thumbnail */}
<div className="bs-docs-section">
<h1 className="page-header"><Anchor id="thumbnail">Thumbnail</Anchor></h1>
Expand Down Expand Up @@ -904,22 +920,6 @@ const ComponentsPage = React.createClass({
<h4><Anchor id="utilities-fade-props">Props</Anchor></h4>
<PropTable component="Fade"/>
</div>

{/* Images */}
<div className="bs-docs-section">
<h1 className="page-header"><Anchor id="images">Images</Anchor></h1>

<h3><Anchor id="image-shape">Shape</Anchor></h3>
<p>Use the <code>rounded</code>, <code>circle</code> and <code>thumbnail</code> props to customise the image.</p>
<ReactPlayground codeText={Samples.ImageShape} />

<h3><Anchor id="image-responsive">Responsive</Anchor></h3>
<p>Use the <code>responsive</code> to scale image nicely to the parent element.</p>
<ReactPlayground codeText={Samples.ImageResponsive} />

<h3><Anchor id="image-props">Props</Anchor></h3>
<PropTable component="Image"/>
</div>
</div>


Expand Down Expand Up @@ -953,6 +953,7 @@ const ComponentsPage = React.createClass({
<NavItem href="#alerts" key={14}>Alerts</NavItem>
<NavItem href="#carousels" key={15}>Carousels</NavItem>
<NavItem href="#grids" key={16}>Grids</NavItem>
<NavItem href="#images" key={29}>Images</NavItem>
<NavItem href="#thumbnail" key={17}>Thumbnail</NavItem>
<NavItem href="#listgroup" key={18}>List group</NavItem>
<NavItem href="#labels" key={19}>Labels</NavItem>
Expand All @@ -964,7 +965,6 @@ const ComponentsPage = React.createClass({
<NavItem href="#tables" key={25}>Tables</NavItem>
<NavItem href="#input" key={26}>Input</NavItem>
<NavItem href="#utilities" key={28}>Utilities</NavItem>
<NavItem href="#images" key={29}>Images</NavItem>
</Nav>
<a className="back-to-top" href="#top">
Back to top
Expand Down
14 changes: 7 additions & 7 deletions test/ImageSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Image from '../src/Image';

describe('Image', function() {
describe('Image', () => {

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

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

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

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

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

it('should have correct class when thumbnail prop is set', function() {
it('should have correct class when thumbnail prop is set', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Image thumbnail />
);
Expand Down

0 comments on commit 3edf4a1

Please sign in to comment.