From 5c5462592d010dcdbc62145ed2fcd8475b34ce8a Mon Sep 17 00:00:00 2001 From: psjostrom Date: Thu, 14 Jan 2021 12:10:20 +0100 Subject: [PATCH] SDA-2824 Set notification position modal darkmode --- .../notificationSettings.spec.ts.snap | 36 ++++++++- spec/mainApiHandler.spec.ts | 4 +- spec/notificationSettings.spec.ts | 14 ++-- src/app/main-api-handler.ts | 4 +- src/app/window-handler.ts | 6 +- src/common/api-interface.ts | 3 + src/renderer/app-bridge.ts | 2 +- .../components/notification-settings.tsx | 73 +++++++++++++++---- src/renderer/ssf-api.ts | 3 +- .../styles/notification-settings.less | 15 ++-- 10 files changed, 118 insertions(+), 42 deletions(-) diff --git a/spec/__snapshots__/notificationSettings.spec.ts.snap b/spec/__snapshots__/notificationSettings.spec.ts.snap index 6ac2eac7..64889c66 100644 --- a/spec/__snapshots__/notificationSettings.spec.ts.snap +++ b/spec/__snapshots__/notificationSettings.spec.ts.snap @@ -48,10 +48,17 @@ exports[`Notification Settings should mount, unmount and render component should className="position-button-container" > - - ); } @@ -143,13 +164,16 @@ export default class NotificationSettings extends React.Component<{}, IState> { * @param content */ private renderPositionButton(id: startCorner, content: string): JSX.Element { - const style = this.state.position === id ? `position-button position-button-selected ${id}` : `position-button ${id}`; + const style = this.getPositionButtonStyle(id); return (