Skip to content

Commit

Permalink
[list-item] Fixed display problem with Single line checkboxes - Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
hai-cea committed Jun 15, 2015
1 parent 1bb3cef commit 21678b7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 15 additions & 0 deletions docs/src/app/components/pages/components/lists.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,21 @@ class ListsPage extends React.Component {
Messages
</ListItem>
</List>
<ListDivider />
<List subheader="Hangout notifications">
<ListItem
leftCheckbox={<Checkbox />}>
Notifications
</ListItem>
<ListItem
leftCheckbox={<Checkbox />}>
Sounds
</ListItem>
<ListItem
leftCheckbox={<Checkbox />}>
Video sounds
</ListItem>
</List>
</MobileTearSheet>

<MobileTearSheet>
Expand Down
8 changes: 6 additions & 2 deletions src/lists/list-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ var ListItem = React.createClass({
},

leftCheckbox: {
left: 4
position: 'absolute',
display: 'block',
width: 24,
top: twoLine ? 24 : singleAvatar ? 16 : 12,
left: 16
},

rightToggle: {
Expand Down Expand Up @@ -170,7 +174,7 @@ var ListItem = React.createClass({
this._pushElement(contentChildren, rightIcon, this.mergeStyles(styles.icons, styles.rightIcon));
this._pushElement(contentChildren, leftAvatar, this.mergeStyles(styles.avatars, styles.leftAvatar));
this._pushElement(contentChildren, rightAvatar, this.mergeStyles(styles.avatars, styles.rightAvatar));
this._pushElement(contentChildren, leftCheckbox, this.mergeStyles(styles.icons, styles.leftCheckbox));
this._pushElement(contentChildren, leftCheckbox, this.mergeStyles(styles.leftCheckbox));
this._pushElement(contentChildren, rightToggle, this.mergeStyles(styles.rightToggle));

if (this.props.children) contentChildren.push(this.props.children);
Expand Down

0 comments on commit 21678b7

Please sign in to comment.