-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UXUI-239 initial icon-list & icon-list-item
- Loading branch information
jackdcrawford
committed
Jun 11, 2015
1 parent
66beec4
commit d228636
Showing
23 changed files
with
131 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var example = ( | ||
<UIToolkit.IconList> | ||
<UIToolkit.IconListItem icon="plane">Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals Suitable for all terminals </UIToolkit.IconListItem> | ||
<UIToolkit.IconListItem icon="bus">Transfers run every 5 minutes</UIToolkit.IconListItem> | ||
<UIToolkit.IconListItem icon="car">Car parked for you</UIToolkit.IconListItem> | ||
</UIToolkit.IconList> | ||
); | ||
|
||
React.render(example, mountNode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/components/icon-list-item/__tests__/IconListItemComponent-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @jsx React.DOM */ | ||
|
||
jest.dontMock('../code/views/IconListItemComponentView.jsx'); | ||
|
||
var React = require('react/addons'); | ||
var IconListItemComponent = require('../code/views/IconListItemComponentView.jsx'); | ||
var TestUtils = React.addons.TestUtils; | ||
|
||
describe('IconListItemComponent', function() { | ||
|
||
it('is an element', function() { | ||
expect(TestUtils.isElement(<IconListItemComponent />)).toBeTruthy(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./views/IconListItemComponentView.jsx'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*------------------------------------*\ | ||
# Icon list item | ||
\*------------------------------------*/ | ||
|
||
.component-icon-list-item { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/components/icon-list-item/code/templates/IconListItemComponentTemplate.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var React = require('react'); | ||
|
||
module.exports = function(props) { | ||
return ( | ||
<li className="component-icon-list-item"> | ||
<i className={'fa fa-fw fa-' + props.icon} /> | ||
<span>{props.children}</span> | ||
</li> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/components/icon-list-item/code/views/IconListItemComponentView.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var React = require('react'); | ||
|
||
module.exports = React.createClass({ | ||
render: function() { | ||
return require('../templates/IconListItemComponentTemplate.jsx')(this.props); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./code/index'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
if [ -z "$VARIANT" ]; then VARIANT=''; fi | ||
if [ -z "$TEMPLATE_LANG" ]; then TEMPLATE_LANG='en'; fi | ||
|
||
echo "Building package for demo. Variant: '$VARIANT', language: '$TEMPLATE_LANG'." | ||
|
||
browserify -t [ redirectify --dir "$VARIANT" ] -t reactify dev/example.jsx -o dev/ui-component-icon-list-item.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
if [ -z "$VARIANT" ]; then VARIANT=''; fi | ||
if [ -z "$TEMPLATE_LANG" ]; then TEMPLATE_LANG='en'; fi | ||
|
||
echo "Building package for demo. Variant: '$VARIANT', language: '$TEMPLATE_LANG'." | ||
|
||
browserify -t [ redirectify --dir "$VARIANT" ] -t reactify index.js --standalone ui-component-icon-list-item > dist/ui-component-icon-list-item-standalone.js |
15 changes: 15 additions & 0 deletions
15
src/components/icon-list/__tests__/IconListComponent-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @jsx React.DOM */ | ||
|
||
jest.dontMock('../code/views/IconListComponentView.jsx'); | ||
|
||
var React = require('react/addons'); | ||
var IconListComponent = require('../code/views/IconListComponentView.jsx'); | ||
var TestUtils = React.addons.TestUtils; | ||
|
||
describe('IconListComponent', function() { | ||
|
||
it('is an element', function() { | ||
expect(TestUtils.isElement(<IconListComponent />)).toBeTruthy(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./views/IconListComponentView.jsx'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*------------------------------------*\ | ||
# Icon list | ||
\*------------------------------------*/ | ||
|
||
.component-icon-list { | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} |
7 changes: 7 additions & 0 deletions
7
src/components/icon-list/code/templates/IconListComponentTemplate.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function(props) { | ||
return ( | ||
<ul className="component-icon-list"> | ||
{props.children} | ||
</ul> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/components/icon-list/code/views/IconListComponentView.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var React = require('react'); | ||
|
||
module.exports = React.createClass({ | ||
render: function() { | ||
return require('../templates/IconListComponentTemplate.jsx')(this.props); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./code/index'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
if [ -z "$VARIANT" ]; then VARIANT=''; fi | ||
if [ -z "$TEMPLATE_LANG" ]; then TEMPLATE_LANG='en'; fi | ||
|
||
echo "Building package for demo. Variant: '$VARIANT', language: '$TEMPLATE_LANG'." | ||
|
||
browserify -t [ redirectify --dir "$VARIANT" ] -t reactify dev/example.jsx -o dev/ui-component-icon-list.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
if [ -z "$VARIANT" ]; then VARIANT=''; fi | ||
if [ -z "$TEMPLATE_LANG" ]; then TEMPLATE_LANG='en'; fi | ||
|
||
echo "Building package for demo. Variant: '$VARIANT', language: '$TEMPLATE_LANG'." | ||
|
||
browserify -t [ redirectify --dir "$VARIANT" ] -t reactify index.js --standalone ui-component-icon-list > dist/ui-component-icon-list-standalone.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters