diff --git a/mattermost-plugin/webapp/src/components/__snapshots__/boardSelector.test.tsx.snap b/mattermost-plugin/webapp/src/components/__snapshots__/boardSelector.test.tsx.snap index 42663e865..22313e9da 100644 --- a/mattermost-plugin/webapp/src/components/__snapshots__/boardSelector.test.tsx.snap +++ b/mattermost-plugin/webapp/src/components/__snapshots__/boardSelector.test.tsx.snap @@ -21,19 +21,23 @@ exports[`components/boardSelector renders with no results 1`] = `
- +

+ > + +

- +

+ > + +

- +

+ > + +

- +

@@ -52,6 +46,15 @@ exports[`components/cardDialog already following card 1`] = ` />
+

- +

@@ -456,6 +457,15 @@ exports[`components/cardDialog return a cardDialog readonly 1`] = `
+

- +

@@ -706,6 +710,15 @@ exports[`components/cardDialog return cardDialog menu content 1`] = `

+
- +

@@ -899,6 +906,15 @@ exports[`components/cardDialog return cardDialog menu content and cancel delete />
+

- +

@@ -1092,6 +1102,15 @@ exports[`components/cardDialog should match snapshot 1`] = ` />
+

- +

@@ -1285,6 +1298,15 @@ exports[`components/cardDialog should match snapshot without permissions 1`] = ` />
+

- +

+ > + +

- +

+ > + +

- +

+ > + +

- +

+ > + +

- +

@@ -86,6 +83,16 @@ exports[`components/dialog should return dialog and click on cancel button 1`] = />
+

- +

+ > + +

- +

+ > + +

{ const unfollowBtn = ( -
-
-
-

title -

+ +
+ +
+
+
diff --git a/webapp/src/components/createCategory/createCategory.test.tsx b/webapp/src/components/createCategory/createCategory.test.tsx index fd4dbb918..1127a32a8 100644 --- a/webapp/src/components/createCategory/createCategory.test.tsx +++ b/webapp/src/components/createCategory/createCategory.test.tsx @@ -85,7 +85,7 @@ describe('components/createCategory/CreateCategory', () => { userEvent.click(cancelBtn as Element) expect(onCloseHandler).toBeCalledTimes(1) - const closeBtn = container.querySelector('.toolbar > .IconButton') + const closeBtn = container.querySelector('.toolbar .dialog__close') expect(closeBtn).toBeTruthy() userEvent.click(closeBtn as Element) expect(onCloseHandler).toBeCalledTimes(2) diff --git a/webapp/src/components/createCategory/createCategory.tsx b/webapp/src/components/createCategory/createCategory.tsx index 01171b644..2f35c5b26 100644 --- a/webapp/src/components/createCategory/createCategory.tsx +++ b/webapp/src/components/createCategory/createCategory.tsx @@ -78,11 +78,11 @@ const CreateCategory = (props: Props): JSX.Element => { return (
-

{props.title}

* { + > * { flex-shrink: 0; } - >.banner { + > .banner { background-color: rgba(230, 220, 192, 0.9); text-align: center; padding: 10px; color: #222; } - >.banner.error { + > .banner.error { background-color: rgba(230, 192, 192, 0.9); } @@ -100,19 +98,22 @@ } } - >.toolbar { + > .toolbar { display: flex; flex-direction: row; - padding: 24px; + padding: 24px 32px; justify-content: space-between; + align-items: center; } .toolbar--right { display: flex; gap: 8px; + align-items: center; + height: 28px; } - >.content { + > .content { display: flex; flex-direction: column; align-items: flex-start; @@ -126,7 +127,7 @@ } } - >.content.fullwidth { + > .content.fullwidth { padding-left: 78px; } } diff --git a/webapp/src/components/dialog.tsx b/webapp/src/components/dialog.tsx index b897bc0d9..417a4cee0 100644 --- a/webapp/src/components/dialog.tsx +++ b/webapp/src/components/dialog.tsx @@ -16,7 +16,7 @@ type Props = { toolbar?: React.ReactNode hideCloseButton?: boolean className?: string - title?: string + title?: JSX.Element onClose: () => void, } @@ -58,17 +58,7 @@ const Dialog = (props: Props) => { className='dialog' >
- {title &&

{title}

} - { - !props.hideCloseButton && - } - title={closeDialogText} - size='medium' - /> - } + {

{title || ''}

}
{toolbar &&
{toolbar}
} {toolsMenu && @@ -79,6 +69,16 @@ const Dialog = (props: Props) => { {toolsMenu} } + { + !props.hideCloseButton && + } + title={closeDialogText} + size='medium' + /> + }
{props.children} diff --git a/webapp/src/components/searchDialog/searchDialog.scss b/webapp/src/components/searchDialog/searchDialog.scss index e6b054e33..9f8391ec7 100644 --- a/webapp/src/components/searchDialog/searchDialog.scss +++ b/webapp/src/components/searchDialog/searchDialog.scss @@ -4,9 +4,14 @@ .dialog { .toolbar { - flex-direction: row-reverse; padding: 0; } + + .dialog__close { + position: absolute; + right: 32px; + top: 18px; + } } .wrapper { diff --git a/webapp/src/components/shareBoard/__snapshots__/shareBoard.test.tsx.snap b/webapp/src/components/shareBoard/__snapshots__/shareBoard.test.tsx.snap index d2dcd8d19..f73a4784d 100644 --- a/webapp/src/components/shareBoard/__snapshots__/shareBoard.test.tsx.snap +++ b/webapp/src/components/shareBoard/__snapshots__/shareBoard.test.tsx.snap @@ -18,15 +18,9 @@ exports[`src/components/shareBoard/shareBoard confirm unlinking linked channel 1
- +

@@ -37,6 +31,15 @@ exports[`src/components/shareBoard/shareBoard confirm unlinking linked channel 1 Share Board
+

- +

@@ -287,6 +284,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l Share Board
+

- +

@@ -496,6 +496,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l Share Board
+

- +

@@ -705,6 +708,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Regene Share Board
+

- +

@@ -937,6 +943,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select Share Board
+

- +

@@ -1173,6 +1182,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select Share Board
+

- +

@@ -1641,6 +1653,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select Share Board
+

- +

@@ -1877,6 +1892,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select Share Board
+

- +

@@ -2345,6 +2363,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard template and cli Share Template
+

- +

@@ -2530,6 +2551,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard template and cli Share Template
+

- +

@@ -2851,6 +2875,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoard, and click switc Share Board
+

- +

@@ -3083,6 +3110,15 @@ exports[`src/components/shareBoard/shareBoard return shareBoardComponent and cli Share Board
+

- +

@@ -3315,6 +3345,15 @@ exports[`src/components/shareBoard/shareBoard should match snapshot 1`] = ` Share Board
+

- +

@@ -3524,6 +3557,15 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing Share Board
+

- +

@@ -3733,6 +3769,15 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing Share Board
+

- +

@@ -3942,6 +3981,15 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing Share Board
+

- +

@@ -4151,6 +4193,15 @@ exports[`src/components/shareBoard/shareBoard should match snapshot, with templa Share Template
+

- +

+ > + +

- +

+ > + +

- +

+ > + +

- +

+ > + +