feat(settings) Scaffold /settings route
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
function ButtonSpacer() {
|
||||
return <div className='button-spacer' />;
|
||||
return <div className='button-spacer' style={{ padding: '5px 0' }} />;
|
||||
}
|
||||
|
||||
ButtonSpacer.displayName = 'ButtonSpacer';
|
||||
|
24
client/src/components/helpers/form/BlockSaveButton.js
Normal file
24
client/src/components/helpers/form/BlockSaveButton.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button } from '@freecodecamp/react-bootstrap';
|
||||
|
||||
function BlockSaveButton({ children, ...restProps }) {
|
||||
return (
|
||||
<Button
|
||||
block={true}
|
||||
bsSize='lg'
|
||||
bsStyle='primary'
|
||||
type='submit'
|
||||
{...restProps}
|
||||
>
|
||||
{children || 'Save'}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
BlockSaveButton.displayName = 'BlockSaveButton';
|
||||
BlockSaveButton.propTypes = {
|
||||
children: PropTypes.any
|
||||
};
|
||||
|
||||
export default BlockSaveButton;
|
23
client/src/components/helpers/form/BlockSaveWrapper.js
Normal file
23
client/src/components/helpers/form/BlockSaveWrapper.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const propTypes = {
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
const style = {
|
||||
padding: '0 15px'
|
||||
};
|
||||
|
||||
function BlockSaveWrapper({ children, ...restProps }) {
|
||||
return (
|
||||
<div style={style} {...restProps}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
BlockSaveWrapper.displayName = 'BlockSaveWrapper';
|
||||
BlockSaveWrapper.propTypes = propTypes;
|
||||
|
||||
export default BlockSaveWrapper;
|
Reference in New Issue
Block a user