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 { .switchWithLabel {
display: flex;
.label { .label {
padding-right: 16px; padding-right: 16px;
line-height: 24px; 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' }}> <Card shadow={0} className={commonStyles.fullwidth} style={{ overflow: 'visible' }}>
<CardTitle style={{ paddingTop: '24px', wordBreak: 'break-all' }}>{featureToggle.name}</CardTitle> <CardTitle style={{ paddingTop: '24px', wordBreak: 'break-all' }}>{featureToggle.name}</CardTitle>
<CardText>{featureToggle.description}</CardText> <CardText>{featureToggle.description}</CardText>
<CardActions border style={{ display: 'flex', alignItems: 'center' }}> <CardActions border style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<Switch ripple checked={featureToggle.enabled} onChange={() => toggleFeature(featureToggle.name)}> <span style={{ paddingRight: '24px' }}>
{featureToggle.enabled ? 'Enabled' : 'Disabled'} <Switch ripple checked={featureToggle.enabled} onChange={() => toggleFeature(featureToggle.name)}>
</Switch> {featureToggle.enabled ? 'Enabled' : 'Disabled'}
</Switch>
</span>
<Button onClick={removeToggle} style={{ flexShrink: 0 }}>Archive</Button> <Button onClick={removeToggle} style={{ flexShrink: 0 }}>Archive</Button>
</CardActions> </CardActions>
<hr className={commonStyles.divider}/> <hr className={commonStyles.divider}/>