Skip to content

Commit

Permalink
Remove close button on inline pattern edit forms, and save on input i…
Browse files Browse the repository at this point in the history
…nstead of submit.
  • Loading branch information
danielnaab committed Apr 19, 2024
1 parent 24c605d commit f7df5c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion packages/design/src/FormManager/FormEdit/PatternEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const PatternEdit = ({ pattern }: { pattern: Pattern }) => {
<div>
{SelectedEditComponent ? (
<form
onSubmit={methods.handleSubmit(formData => {
onInput={methods.handleSubmit(formData => {
console.log('submitting');
updatePatternById(pattern.id, formData);
})}
Expand Down
15 changes: 0 additions & 15 deletions packages/design/src/FormManager/FormEdit/PatternEditActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ export const PatternEditActions = ({ children }: PatternEditActionsProps) => {
'margin-right-1': children,
})}
>
<button
aria-label="Exit editing mode for this pattern"
title="Exit editing mode for this pattern"
className="usa-button--outline usa-button--unstyled"
>
<svg
className="usa-icon usa-icon--size-3 margin-1"
style={{ verticalAlign: 'middle' }}
aria-hidden="true"
focusable="false"
role="img"
>
<use xlinkHref={`${context.uswdsRoot}img/sprite.svg#close`}></use>
</svg>
</button>
<button
aria-label="Delete this pattern"
title="Delete this pattern"
Expand Down

0 comments on commit f7df5c3

Please sign in to comment.