Skip to content

Commit 299cf15

Browse files
committed
Fix input dialog snapshots
1 parent fc9c049 commit 299cf15

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

packages/app/app/components/Playlists/PlaylistsHeader/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const PlaylistsHeader: React.FC<PlaylistsHeaderProps> = ({
5050
>
5151
<div className={styles.playlist_header_buttons}>
5252
<InputDialog
53-
header={t('create-playlist-dialog-title')}
53+
header={<h4>t('create-playlist-dialog-title')</h4>}
5454
placeholder={t('dialog-placeholder')}
5555
acceptLabel={t('dialog-accept')}
5656
cancelLabel={t('dialog-cancel')}

packages/app/app/containers/TrackPopupContainer/__snapshots__/TrackPopupContainer.test.tsx.snap

+1-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,7 @@ exports[`Track Popup container creating new playlist should open Input Dialog 1`
154154
class="content"
155155
>
156156
<h4>
157-
<h4>
158-
Input playlist name:
159-
</h4>
157+
Input playlist name:
160158
</h4>
161159
<div
162160
class="ui fluid inverted input"

packages/ui/lib/components/InputDialog/index.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface CoreInputDialogProps {
1414

1515
interface UncontrolledInputDialogProps extends CoreInputDialogProps {
1616
trigger: ModalProps['trigger'];
17-
onClose: () => void;
17+
onClose?: () => void;
1818
}
1919

2020
interface ControlledInputDialogProps extends CoreInputDialogProps {
@@ -93,9 +93,7 @@ const InputDialog: React.VFC<InputDialogProps> = ({
9393
{...(isControlled ? {} : { trigger: props.trigger })}
9494
>
9595
<Modal.Content>
96-
<h4>
97-
{header}
98-
</h4>
96+
{header}
9997
<Input
10098
fluid
10199
inverted

packages/ui/test/__snapshots__/inputDialog.test.tsx.snap

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ exports[`(Snapshot) InputDialog - open should render correctly 1`] = `
1919
<div
2020
class="content"
2121
>
22-
<h4>
23-
Input header
24-
</h4>
22+
Input header
2523
<div
2624
class="ui fluid inverted input"
2725
>

0 commit comments

Comments
 (0)