feat(instances): user scripts responsive designs
This commit is contained in:
parent
cad1431e79
commit
deb1a8436f
@ -1,4 +1,5 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
import { withTheme } from 'styled-components';
|
||||||
import { Margin } from 'styled-components-spacing';
|
import { Margin } from 'styled-components-spacing';
|
||||||
import { compose } from 'react-apollo';
|
import { compose } from 'react-apollo';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
@ -30,8 +31,11 @@ const UserScript = ({
|
|||||||
handleChangeOpenForm,
|
handleChangeOpenForm,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
handleEdit,
|
handleEdit,
|
||||||
|
theme = {},
|
||||||
...props
|
...props
|
||||||
}) => (
|
}) => {
|
||||||
|
const mobile = theme.screen === 'mobile';
|
||||||
|
return (
|
||||||
<Step name="user-script" getValue={handleGetValue} {...props}>
|
<Step name="user-script" getValue={handleGetValue} {...props}>
|
||||||
<StepHeader icon={<ScriptIcon />}>User script</StepHeader>
|
<StepHeader icon={<ScriptIcon />}>User script</StepHeader>
|
||||||
<StepDescription href="https://docs.joyent.com/private-cloud/instances/using-mdata#UsingtheMetadataAPI-ListofMetadataKeys">
|
<StepDescription href="https://docs.joyent.com/private-cloud/instances/using-mdata#UsingtheMetadataAPI-ListofMetadataKeys">
|
||||||
@ -53,12 +57,13 @@ const UserScript = ({
|
|||||||
{props => (
|
{props => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<UserScriptForm {...props} />
|
<UserScriptForm {...props} />
|
||||||
<Margin top="5">
|
<Margin top={mobile ? '3' : '5'}>
|
||||||
<Button
|
<Button
|
||||||
id="next-button-userscript"
|
id="next-button-userscript"
|
||||||
type="button"
|
type="button"
|
||||||
component={Link}
|
component={Link}
|
||||||
to={next}
|
to={next}
|
||||||
|
fluid={mobile}
|
||||||
>
|
>
|
||||||
Next
|
Next
|
||||||
</Button>
|
</Button>
|
||||||
@ -71,6 +76,7 @@ const UserScript = ({
|
|||||||
</StepOutlet>
|
</StepOutlet>
|
||||||
</Step>
|
</Step>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default compose(
|
export default compose(
|
||||||
connect(
|
connect(
|
||||||
@ -100,4 +106,4 @@ export default compose(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)(UserScript);
|
)(withTheme(({ ...rest }) => <UserScript {...rest} />));
|
||||||
|
Loading…
Reference in New Issue
Block a user