Skip to content

Commit

Permalink
fix(decorator-mui): customize addText
Browse files Browse the repository at this point in the history
  • Loading branch information
soup-in-boots committed Nov 5, 2022
1 parent 5fc7c55 commit 421e388
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/decorator-mui/src/arrays/items.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ function Items(props, ref) {
const disableGutters =
'disableGutters' in form ? form.disableGutters : false;
const icon = 'icon' in form ? form.icon : 'view_list';
const addText =
'addText' in form
? form.addText
: `${localizer.getLocalizedString('Add')} ${title}`;

return (
<Paper
Expand Down Expand Up @@ -89,7 +93,7 @@ function Items(props, ref) {
startIcon={<Icon>add</Icon>}
disabled={disabled}
>
{localizer.getLocalizedString('Add')} {title}
{addText}
</Button>
</ListItem>
{props.children}
Expand Down

0 comments on commit 421e388

Please sign in to comment.