(
}/>
- }/>
+ }/>
);
diff --git a/ui_framework/doc_site/src/views/button/button_loading.js b/ui_framework/doc_site/src/views/button/button_loading.js
new file mode 100644
index 0000000000000..3f58084dc6a8b
--- /dev/null
+++ b/ui_framework/doc_site/src/views/button/button_loading.js
@@ -0,0 +1,58 @@
+import React, {
+ Component,
+} from 'react';
+
+import {
+ KuiCreateButtonIcon,
+ KuiPrimaryButton,
+ KuiBasicButton,
+} from '../../../../components';
+
+export default class LoadingButton extends Component {
+ constructor() {
+ super();
+
+ this.state = {
+ isLoading: false,
+ };
+
+ this.onClick = this.onClick.bind(this);
+ }
+
+ onClick() {
+ this.setState({
+ isLoading: true,
+ });
+
+ setTimeout(() => {
+ this.setState({
+ isLoading: false,
+ });
+ }, 3000);
+ }
+
+ render() {
+ return (
+
+
+ {this.state.isLoading ? 'Loading...' : 'Load more'}
+
+
+
+
+ }
+ isLoading={this.state.isLoading}
+ isDisabled={this.state.isLoading}
+ >
+ {this.state.isLoading ? 'Creating...' : 'Create'}
+
+
+ );
+ }
+}
diff --git a/ui_framework/doc_site/src/views/button/button_with_icon.js b/ui_framework/doc_site/src/views/button/button_with_icon.js
index 218154a03dd09..bcaa3aa8fd511 100644
--- a/ui_framework/doc_site/src/views/button/button_with_icon.js
+++ b/ui_framework/doc_site/src/views/button/button_with_icon.js
@@ -8,6 +8,7 @@ import {
KuiDeleteButtonIcon,
KuiNextButtonIcon,
KuiPreviousButtonIcon,
+ KuiLoadingButtonIcon,
KuiPrimaryButton,
} from '../../../../components';
@@ -31,12 +32,18 @@ export default () => (
- }>
+ } isIconOnRight>
Next
+ }>
+ Loading
+
+
+
+
}/>
);