Skip to content

Commit

Permalink
fix(react-ribbon): rename ribbon component to inline ribbon
Browse files Browse the repository at this point in the history
Signed-off-by: Da Lu <dlu@pivotal.io>
  • Loading branch information
Paul Meskers authored and bebepeng committed Jan 8, 2015
1 parent e90c9e4 commit cddfdc8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/pivotal-ui/components/ribbons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,16 @@ categories:
- Beta
---
```html_example
<div id="ribbon-example"></div>
<div id="Inline-ribbon-example"></div>
```
```jsx_example
React.render(
<div>
<UI.Ribbon> British </UI.Ribbon>
<UI.InlineRibbon> British </UI.InlineRibbon>
</div>,
document.getElementById('ribbon-example')
document.getElementById('Inline-ribbon-example')
);
```
Expand Down
2 changes: 1 addition & 1 deletion src/pivotal-ui/javascripts/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {

Image: require('./images.jsx').Image,

Ribbon: require('./ribbons.jsx').Ribbon,
InlineRibbon: require('./ribbons.jsx').InlineRibbon,

Tab: require('./tabs.jsx').Tab,
SimpleTabs: require('./tabs.jsx').SimpleTabs,
Expand Down
4 changes: 2 additions & 2 deletions src/pivotal-ui/javascripts/ribbons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var React = require('react/addons');


var Ribbon = React.createClass({
var InlineRibbon = React.createClass({
render: function() {
return (
<div className = "inline-ribbon">
Expand All @@ -16,7 +16,7 @@ var Ribbon = React.createClass({

module.exports = {

Ribbon: Ribbon
InlineRibbon: InlineRibbon
};


Expand Down
8 changes: 4 additions & 4 deletions test/spec/javascripts/ribbon_spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ var $ = require('jquery');
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;

var Ribbon = require('../../../src/pivotal-ui/javascripts/ribbons.jsx').Ribbon;
var InlineRibbon = require('../../../src/pivotal-ui/javascripts/ribbons.jsx').InlineRibbon;

describe('Ribbon', function() {
describe('InlineRibbon', function() {
beforeEach(function() {
this.node = $('<div id="container"></div>').appendTo('body').get(0);

React.render(
<Ribbon>British</Ribbon>, this.node
<InlineRibbon>British</InlineRibbon>, this.node
);
});
afterEach(function() {
Expand All @@ -20,7 +20,7 @@ describe('Ribbon', function() {
});


it("renders a ribbon", function() {
it("renders a inline ribbon", function() {
expect($('#container .inline-ribbon')).toHaveText('British');
});
});
Expand Down

0 comments on commit cddfdc8

Please sign in to comment.