diff --git a/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Dark.png b/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Dark.png
index 623e3481..064243c6 100644
Binary files a/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Dark.png and b/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Dark.png differ
diff --git a/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Normal.png b/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Normal.png
index 0479740a..0f46eece 100644
Binary files a/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Normal.png and b/.loki/reference/chrome_iphone7_features_ThemeSwitcher_Normal.png differ
diff --git a/.loki/reference/chrome_iphone7_widgets_Sidebar_Dark.png b/.loki/reference/chrome_iphone7_widgets_Sidebar_Dark.png
index e64c2cbd..8a56d804 100644
Binary files a/.loki/reference/chrome_iphone7_widgets_Sidebar_Dark.png and b/.loki/reference/chrome_iphone7_widgets_Sidebar_Dark.png differ
diff --git a/.loki/reference/chrome_iphone7_widgets_Sidebar_Light.png b/.loki/reference/chrome_iphone7_widgets_Sidebar_Light.png
index 21f5771d..c85250d8 100644
Binary files a/.loki/reference/chrome_iphone7_widgets_Sidebar_Light.png and b/.loki/reference/chrome_iphone7_widgets_Sidebar_Light.png differ
diff --git a/.loki/reference/chrome_iphone7_widgets_Sidebar_No_Auth.png b/.loki/reference/chrome_iphone7_widgets_Sidebar_No_Auth.png
index 24ef15e2..0c3863f9 100644
Binary files a/.loki/reference/chrome_iphone7_widgets_Sidebar_No_Auth.png and b/.loki/reference/chrome_iphone7_widgets_Sidebar_No_Auth.png differ
diff --git a/.loki/reference/chrome_laptop_features_ThemeSwitcher_Dark.png b/.loki/reference/chrome_laptop_features_ThemeSwitcher_Dark.png
index 9c925d3d..3cdcacc0 100644
Binary files a/.loki/reference/chrome_laptop_features_ThemeSwitcher_Dark.png and b/.loki/reference/chrome_laptop_features_ThemeSwitcher_Dark.png differ
diff --git a/.loki/reference/chrome_laptop_features_ThemeSwitcher_Normal.png b/.loki/reference/chrome_laptop_features_ThemeSwitcher_Normal.png
index 1098b3e6..1bca0d81 100644
Binary files a/.loki/reference/chrome_laptop_features_ThemeSwitcher_Normal.png and b/.loki/reference/chrome_laptop_features_ThemeSwitcher_Normal.png differ
diff --git a/.loki/reference/chrome_laptop_widgets_Sidebar_Dark.png b/.loki/reference/chrome_laptop_widgets_Sidebar_Dark.png
index deaf0b71..950687d2 100644
Binary files a/.loki/reference/chrome_laptop_widgets_Sidebar_Dark.png and b/.loki/reference/chrome_laptop_widgets_Sidebar_Dark.png differ
diff --git a/.loki/reference/chrome_laptop_widgets_Sidebar_Light.png b/.loki/reference/chrome_laptop_widgets_Sidebar_Light.png
index 0002f33a..9a8a5448 100644
Binary files a/.loki/reference/chrome_laptop_widgets_Sidebar_Light.png and b/.loki/reference/chrome_laptop_widgets_Sidebar_Light.png differ
diff --git a/.loki/reference/chrome_laptop_widgets_Sidebar_No_Auth.png b/.loki/reference/chrome_laptop_widgets_Sidebar_No_Auth.png
index 8899d142..a62d98e5 100644
Binary files a/.loki/reference/chrome_laptop_widgets_Sidebar_No_Auth.png and b/.loki/reference/chrome_laptop_widgets_Sidebar_No_Auth.png differ
diff --git a/config/build/buildLoaders.ts b/config/build/buildLoaders.ts
index d234926d..90cdc677 100644
--- a/config/build/buildLoaders.ts
+++ b/config/build/buildLoaders.ts
@@ -9,7 +9,22 @@ export function buildLoaders(options: BuildOptions): webpack.RuleSetRule[] {
const svgLoader = {
test: /\.svg$/,
- use: ['@svgr/webpack'],
+ use: [{
+ loader: '@svgr/webpack',
+ options: {
+ icon: true,
+ svgoConfig: {
+ plugins: [
+ {
+ name: 'convertColors',
+ params: {
+ currentColor: true,
+ }
+ }
+ ]
+ }
+ }
+ }],
};
const codeBabelLoader = buildBabelLoader({ ...options, isTsx: false });
diff --git a/src/features/ThemeSwitcher/ui/ThemeSwitcher.tsx b/src/features/ThemeSwitcher/ui/ThemeSwitcher.tsx
index bd337127..e70723f9 100644
--- a/src/features/ThemeSwitcher/ui/ThemeSwitcher.tsx
+++ b/src/features/ThemeSwitcher/ui/ThemeSwitcher.tsx
@@ -1,13 +1,12 @@
import { memo, useCallback } from 'react';
import { classNames } from '@/shared/lib/classNames';
-import LightIcon from '@/shared/assets/icons/theme-light.svg';
-import DarkIcon from '@/shared/assets/icons/theme-dark.svg';
import { Button, ButtonTheme } from '@/shared/ui/Button';
-import { Theme } from '@/shared/const/theme';
import { useTheme } from '@/shared/lib/hooks/useTheme/useTheme';
import { saveJsonSettings } from '@/entities/User';
import { useAppDispatch } from '@/shared/lib/hooks/useAppDispatch/useAppDispatch';
+import ThemeIcon from '@/shared/assets/icons/theme.svg';
+import { Icon } from '@/shared/ui/Icon';
interface ThemeSwitcherProps {
className?: string;
@@ -29,7 +28,7 @@ export const ThemeSwitcher = memo(({ className }: ThemeSwitcherProps) => {
className={classNames('', {}, [className])}
onClick={onToggleHandler}
>
- {theme === Theme.DARK ? : }
+
);
});
diff --git a/src/features/articleViewSelector/ui/ArticleViewSelector/ArticleViewSelector.tsx b/src/features/articleViewSelector/ui/ArticleViewSelector/ArticleViewSelector.tsx
index b64807df..06339ded 100644
--- a/src/features/articleViewSelector/ui/ArticleViewSelector/ArticleViewSelector.tsx
+++ b/src/features/articleViewSelector/ui/ArticleViewSelector/ArticleViewSelector.tsx
@@ -40,6 +40,8 @@ export const ArticleViewSelector = memo((props: ArticleViewSelectorProps) => {
))}
diff --git a/src/shared/assets/icons/theme-dark.svg b/src/shared/assets/icons/theme-dark.svg
deleted file mode 100644
index aadf8eb4..00000000
--- a/src/shared/assets/icons/theme-dark.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/src/shared/assets/icons/theme-light.svg b/src/shared/assets/icons/theme.svg
similarity index 100%
rename from src/shared/assets/icons/theme-light.svg
rename to src/shared/assets/icons/theme.svg