Skip to content

Commit 646606c

Browse files
Saqib AshrafSaqib Ashraf
Saqib Ashraf
authored and
Saqib Ashraf
committed
resolve import into one import for default theme
1 parent 231ed14 commit 646606c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

components/SystemAlerts/SystemAlert.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*/
2121

22-
import { default as defaultTheme, default as theme } from '@/components/theme';
22+
import { default as theme } from '@/components/theme';
2323
import { Error as ErrorIcon, Info, Warning } from '@/components/theme/icons';
2424
import Dismiss from '@/components/theme/icons/dismiss';
2525
import { css } from '@emotion/react';
@@ -33,22 +33,22 @@ type Props = {
3333

3434
const AlertVariants = {
3535
critical: {
36-
backgroundColor: defaultTheme.colors.error_2,
36+
backgroundColor: theme.colors.error_2,
3737
icon: <ErrorIcon height={26} width={26} />,
38-
textColor: defaultTheme.colors.black,
39-
outline: defaultTheme.colors.error_dark,
38+
textColor: theme.colors.black,
39+
outline: theme.colors.error_dark,
4040
},
4141
warning: {
4242
backgroundColor: theme.colors.warning_light,
4343
icon: <Warning height={26} width={26} />,
44-
textColor: defaultTheme.colors.black,
45-
outline: defaultTheme.colors.warning_dark,
44+
textColor: theme.colors.black,
45+
outline: theme.colors.warning_dark,
4646
},
4747
info: {
48-
backgroundColor: defaultTheme.colors.secondary_1,
49-
icon: <Info fill={defaultTheme.colors.secondary_accessible} />,
50-
textColor: defaultTheme.colors.black,
51-
outline: defaultTheme.colors.secondary_dark,
48+
backgroundColor: theme.colors.secondary_1,
49+
icon: <Info fill={theme.colors.secondary_accessible} />,
50+
textColor: theme.colors.black,
51+
outline: theme.colors.secondary_dark,
5252
},
5353
};
5454

@@ -84,7 +84,7 @@ export const SystemAlert: React.FC<Props> = ({ alert, onClose }) => {
8484
css={css`
8585
color: ${textColor};
8686
margin-top: ${alert.message ? '0px' : '6px'};
87-
${defaultTheme.typography.heading};
87+
${theme.typography.heading};
8888
`}
8989
>
9090
{alert.title}
@@ -94,7 +94,7 @@ export const SystemAlert: React.FC<Props> = ({ alert, onClose }) => {
9494
css={css`
9595
color: ${textColor};
9696
margin-bottom: 8px;
97-
${defaultTheme.typography.regular};
97+
${theme.typography.regular};
9898
`}
9999
dangerouslySetInnerHTML={createMarkup(alert.message)}
100100
/>
@@ -108,7 +108,7 @@ export const SystemAlert: React.FC<Props> = ({ alert, onClose }) => {
108108
`}
109109
onClick={onClose}
110110
>
111-
<Dismiss height={15} width={15} fill={defaultTheme.colors.black} />
111+
<Dismiss height={15} width={15} fill={theme.colors.black} />
112112
</div>
113113
)}
114114
</div>

0 commit comments

Comments
 (0)