ActionButton adapted to the latest changes in common

This commit is contained in:
NikolaBorislavovHristov 2019-09-25 15:13:20 +03:00
parent 41fe4f0133
commit 0696ac48ac
2 changed files with 12 additions and 4 deletions

View file

@ -10,7 +10,9 @@ const ActionButton = ({ className, icon, label, ...props }) => {
<Button {...props} className={classnames(className, styles['action-button-container'])} title={label}>
{
typeof icon === 'string' && icon.length > 0 ?
<Icon className={styles['icon']} icon={icon} />
<div className={styles['icon-container']}>
<Icon className={styles['icon']} icon={icon} />
</div>
:
null
}

View file

@ -3,20 +3,26 @@
flex-direction: column;
justify-content: center;
&:hover {
&:hover, &:focus {
background-color: var(--color-surfacedarker60);
}
.icon {
.icon-container {
flex-grow: 0;
flex-shrink: 0;
flex-basis: 50%;
padding-top: 15%;
fill: var(--color-surfacelighter);
&:only-child {
padding: 5% 0;
}
.icon {
display: block;
width: 100%;
height: 100%;
fill: var(--color-surfacelighter);
}
}
.label-container {