diff --git a/src/form/components/SubmitButton.js b/src/form/components/SubmitButton.js
index f567569..ce54b83 100644
--- a/src/form/components/SubmitButton.js
+++ b/src/form/components/SubmitButton.js
@@ -18,8 +18,11 @@ export const STATES = {
};
SubmitButton.propTypes = {
+ /** Disable button */
disabled: PropTypes.bool,
+ /** Button state */
state: PropTypes.oneOf(Object.keys(STATES).map((key) => STATES[key])),
+ /** Button label */
label: PropTypes.string,
};
@@ -34,7 +37,7 @@ export function SubmitButton({ disabled, state, label, ...props }) {
labelSubmitButton = _("Updating");
break;
case STATES.LOAD:
- labelSubmitButton = _("Load settings");
+ labelSubmitButton = _("Loading");
break;
default:
labelSubmitButton = _("Save");
diff --git a/src/form/components/SubmitButton.md b/src/form/components/SubmitButton.md
new file mode 100644
index 0000000..9c8f8aa
--- /dev/null
+++ b/src/form/components/SubmitButton.md
@@ -0,0 +1,12 @@
+SubmitButton is a component that renders a button with different states based on
+the `state` prop. It can be used to indicate the status of a form submission.
+
+```jsx padded
+
+
+
+
+
+
+
+```