-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export: Dummy UI flow for export process
Squashed commits: Exporter: Only allow one of Posts, Pages or Feedback to be selected Exporter: Improve styling of the text under Feedback heading to match design Exporter: Always show basic Export button, change text to clarify The button displayed above the advanced settings is now 'Export All', and is displayed even when the advanced settings are visible. Exporter: Change wording to suit the switch to radios
- Loading branch information
Showing
12 changed files
with
279 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React, { PropTypes } from 'react'; | ||
import { omit } from 'lodash'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Button from 'components/forms/form-button'; | ||
import Spinner from 'components/spinner'; | ||
|
||
export default React.createClass( { | ||
displayName: 'SpinnerButton', | ||
|
||
propTypes: { | ||
disabled: PropTypes.bool, | ||
loading: PropTypes.bool, | ||
|
||
text: PropTypes.string, | ||
loadingText: PropTypes.string, | ||
size: PropTypes.number | ||
}, | ||
|
||
getDefaultProps() { | ||
return { | ||
size: 24, | ||
loading: false | ||
} | ||
}, | ||
|
||
render() { | ||
const { loading, text, loadingText, size, disabled } = this.props; | ||
|
||
// Pass any extra props down to the Button component, leaving out | ||
// any SpinnerButton specific props | ||
const buttonProps = omit( this.props, [ | ||
'loading', | ||
'loadingText', | ||
'text', | ||
'size', | ||
'disabled' | ||
] ); | ||
|
||
return ( | ||
<div> | ||
<Button disabled={ loading || disabled } { ...buttonProps }> | ||
{ loading ? loadingText : text } | ||
</Button> | ||
|
||
{ loading && | ||
<Spinner | ||
size={ size } | ||
className="exporter__spinner-button" /> | ||
} | ||
</div> | ||
); | ||
} | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.