List: implement right icon for list items.

master
Tom Hacohen 6 years ago
parent 85ac4da839
commit 68b38f115f

@ -26,13 +26,20 @@
outline: 0;
}
.ListItem .ListIcon {
.ListItem .ListIconLeft {
margin-left: 5px;
margin-right: 20px;
margin-top: 8px;
margin-bottom: 8px;
}
.ListItem .ListIconRight {
margin-left: auto;
margin-right: 5px;
margin-top: 8px;
margin-bottom: 8px;
}
.ListItem-Item:hover {
background-color: rgba(0, 0, 0, 0.1);
cursor: pointer;

@ -85,7 +85,11 @@ export const ListItem = pure((_props: any) => {
} = _props;
const leftIconHolder = (leftIcon) ? (
<div className="ListIcon">{leftIcon}</div>
<div className="ListIconLeft">{leftIcon}</div>
) : undefined;
const rightIconHolder = (rightIcon) ? (
<div className="ListIconRight">{rightIcon}</div>
) : undefined;
let textHolder = primaryText;
@ -105,6 +109,7 @@ export const ListItem = pure((_props: any) => {
{leftIconHolder}
{textHolder}
{children}
{rightIconHolder}
</ListItemRaw>
);
});

Loading…
Cancel
Save