File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import { makeStyles } from "@material-ui/core/styles"
3
3
import React from "react"
4
4
import { LoadingButton } from "../LoadingButton/LoadingButton"
5
5
6
+ const Language = {
7
+ cancelLabel : "Cancel" ,
8
+ defaultSubmitLabel : "Submit" ,
9
+ }
10
+
6
11
export interface FormFooterProps {
7
12
onCancel : ( ) => void
8
13
isLoading : boolean
@@ -22,12 +27,16 @@ const useStyles = makeStyles(() => ({
22
27
} ,
23
28
} ) )
24
29
25
- export const FormFooter : React . FC < FormFooterProps > = ( { onCancel, isLoading, submitLabel = "Submit" } ) => {
30
+ export const FormFooter : React . FC < FormFooterProps > = ( {
31
+ onCancel,
32
+ isLoading,
33
+ submitLabel = Language . defaultSubmitLabel ,
34
+ } ) => {
26
35
const styles = useStyles ( )
27
36
return (
28
37
< div className = { styles . footer } >
29
38
< Button className = { styles . button } onClick = { onCancel } variant = "outlined" >
30
- Cancel
39
+ { Language . cancelLabel }
31
40
</ Button >
32
41
< LoadingButton loading = { isLoading } className = { styles . button } variant = "contained" color = "primary" type = "submit" >
33
42
{ submitLabel }
You can’t perform that action at this time.
0 commit comments