1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

makes the toggle switch not span the entire width of the page

This commit is contained in:
vsandvold 2017-02-02 16:31:22 +01:00 committed by Vegard Sandvold
parent f28e9f270e
commit 92eaed85d1
2 changed files with 8 additions and 4 deletions

View File

@ -56,6 +56,8 @@
}
.switchWithLabel {
display: flex;
.label {
padding-right: 16px;
line-height: 24px;

View File

@ -92,10 +92,12 @@ export default class ViewFeatureToggleComponent extends React.Component {
<Card shadow={0} className={commonStyles.fullwidth} style={{ overflow: 'visible' }}>
<CardTitle style={{ paddingTop: '24px', wordBreak: 'break-all' }}>{featureToggle.name}</CardTitle>
<CardText>{featureToggle.description}</CardText>
<CardActions border style={{ display: 'flex', alignItems: 'center' }}>
<Switch ripple checked={featureToggle.enabled} onChange={() => toggleFeature(featureToggle.name)}>
{featureToggle.enabled ? 'Enabled' : 'Disabled'}
</Switch>
<CardActions border style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<span style={{ paddingRight: '24px' }}>
<Switch ripple checked={featureToggle.enabled} onChange={() => toggleFeature(featureToggle.name)}>
{featureToggle.enabled ? 'Enabled' : 'Disabled'}
</Switch>
</span>
<Button onClick={removeToggle} style={{ flexShrink: 0 }}>Archive</Button>
</CardActions>
<hr className={commonStyles.divider}/>