diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-04-14 17:15:19 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-16 00:55:01 +0200 |
commit | 95ff89bf41bcf23e7785b37b2515a5fbc966da15 (patch) | |
tree | a194b3f87af747db2e7486cc1055ab6bbb80229c /packages/renderer/src/components/sidebar/ServiceIcon.tsx | |
parent | chore(deps): Bump electron to 19 for setBackgroundColor fix (diff) | |
download | sophie-95ff89bf41bcf23e7785b37b2515a5fbc966da15.tar.gz sophie-95ff89bf41bcf23e7785b37b2515a5fbc966da15.tar.zst sophie-95ff89bf41bcf23e7785b37b2515a5fbc966da15.zip |
fix(renderer): Flip all RTL styles
We need a sylis plugin for this according to
https://mui.com/material-ui/guides/right-to-left/#3-install-the-rtl-plugin
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/renderer/src/components/sidebar/ServiceIcon.tsx')
-rw-r--r-- | packages/renderer/src/components/sidebar/ServiceIcon.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/renderer/src/components/sidebar/ServiceIcon.tsx b/packages/renderer/src/components/sidebar/ServiceIcon.tsx index 1017be9..7a6d58a 100644 --- a/packages/renderer/src/components/sidebar/ServiceIcon.tsx +++ b/packages/renderer/src/components/sidebar/ServiceIcon.tsx | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | import IconWarning from '@mui/icons-material/Warning'; | 21 | import IconWarning from '@mui/icons-material/Warning'; |
22 | import Badge from '@mui/material/Badge'; | 22 | import Badge from '@mui/material/Badge'; |
23 | import { styled, useTheme } from '@mui/material/styles'; | 23 | import { styled } from '@mui/material/styles'; |
24 | import { observer } from 'mobx-react-lite'; | 24 | import { observer } from 'mobx-react-lite'; |
25 | import React, { useEffect, useState } from 'react'; | 25 | import React, { useEffect, useState } from 'react'; |
26 | 26 | ||
@@ -89,7 +89,6 @@ const ServiceIconErrorBadge = styled(ServiceIconBadgeBase, { | |||
89 | })); | 89 | })); |
90 | 90 | ||
91 | function ServiceIcon({ service }: { service: Service }): JSX.Element { | 91 | function ServiceIcon({ service }: { service: Service }): JSX.Element { |
92 | const { direction } = useTheme(); | ||
93 | const { | 92 | const { |
94 | settings: { name }, | 93 | settings: { name }, |
95 | directMessageCount, | 94 | directMessageCount, |
@@ -114,7 +113,7 @@ function ServiceIcon({ service }: { service: Service }): JSX.Element { | |||
114 | badgeContent={hasError ? <IconWarning fontSize="small" /> : 0} | 113 | badgeContent={hasError ? <IconWarning fontSize="small" /> : 0} |
115 | anchorOrigin={{ | 114 | anchorOrigin={{ |
116 | vertical: 'bottom', | 115 | vertical: 'bottom', |
117 | horizontal: direction === 'ltr' ? 'right' : 'left', | 116 | horizontal: 'right', |
118 | }} | 117 | }} |
119 | > | 118 | > |
120 | <ServiceIconBadge | 119 | <ServiceIconBadge |
@@ -125,7 +124,7 @@ function ServiceIcon({ service }: { service: Service }): JSX.Element { | |||
125 | color="error" | 124 | color="error" |
126 | anchorOrigin={{ | 125 | anchorOrigin={{ |
127 | vertical: 'top', | 126 | vertical: 'top', |
128 | horizontal: direction === 'ltr' ? 'right' : 'left', | 127 | horizontal: 'right', |
129 | }} | 128 | }} |
130 | > | 129 | > |
131 | <ServiceIconRoot hasError={hasError}> | 130 | <ServiceIconRoot hasError={hasError}> |