forked from MastersAcademy/fe-react-2024
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kostya Nosatskyi
authored and
Kostya Nosatskyi
committed
May 25, 2024
1 parent
9a8fe28
commit 583643a
Showing
18 changed files
with
852 additions
and
84 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
|
||
export const SvgCart = () => ( | ||
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M15.1704 16.3227C14.0658 16.3227 13.1704 17.2759 13.1704 18.4517C13.1704 19.6275 14.0658 20.5807 15.1704 20.5807C16.275 20.5807 17.1704 19.6275 17.1704 18.4517C17.1704 17.2759 16.275 16.3227 15.1704 16.3227ZM15.1704 16.3227H7.46436C7.00329 16.3227 6.77234 16.3227 6.58252 16.2353C6.41507 16.1583 6.26979 16.0343 6.16395 15.8761C6.04531 15.6989 5.9976 15.4618 5.90315 14.9926L3.44189 2.76567C3.34525 2.28556 3.29628 2.04577 3.17627 1.86645C3.07043 1.70829 2.92518 1.58381 2.75773 1.50678C2.56787 1.41943 2.3382 1.41943 1.87694 1.41943H1.17041M4.17041 4.61298H17.0436C17.7654 4.61298 18.1259 4.61298 18.3682 4.77304C18.5804 4.91324 18.7357 5.13313 18.8035 5.38902C18.8808 5.68115 18.7814 6.05004 18.5814 6.78828L17.1968 11.898C17.0772 12.3393 17.0173 12.5596 16.896 12.7234C16.7889 12.868 16.6476 12.9811 16.4875 13.0506C16.3065 13.1291 16.0915 13.1291 15.6625 13.1291H5.90088M6.17041 20.5807C5.06584 20.5807 4.17041 19.6275 4.17041 18.4517C4.17041 17.2759 5.06584 16.3227 6.17041 16.3227C7.27498 16.3227 8.17041 17.2759 8.17041 18.4517C8.17041 19.6275 7.27498 20.5807 6.17041 20.5807Z" | ||
stroke="currentColor" | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
|
||
import { clsx } from 'clsx'; | ||
|
||
import styles from './svgTheme.module.css'; | ||
|
||
interface SvgThemeIconProps { | ||
activeTheme: string; | ||
} | ||
|
||
export const SvgLightThemeIcon: React.FC<SvgThemeIconProps> = ({ activeTheme }) => ( | ||
<svg className={styles.svgThemeButton} viewBox="0 0 20 20"> | ||
<path | ||
className={clsx(styles.pathSvgTheme, { | ||
[styles.activeButtonTheme]: activeTheme === 'light', | ||
[styles.inactiveButtonTheme]: activeTheme !== 'light', | ||
})} | ||
d="M10 3.333V1.667m0 15v1.666M5.345 5.345 4.167 4.167m10.606 10.606 1.179 1.179M3.333 10H1.667m15 0h1.666m-3.56-4.655 1.18-1.178M5.345 14.773l-1.179 1.179M10 14.167a4.167 4.167 0 1 1 0-8.334 4.167 4.167 0 0 1 0 8.334Z" | ||
/> | ||
</svg> | ||
); | ||
|
||
export const SvgDarkThemeIcon: React.FC<SvgThemeIconProps> = ({ activeTheme }) => ( | ||
<svg className={styles.svgThemeButton} viewBox="0 0 20 20"> | ||
<path | ||
className={clsx(styles.pathSvgTheme, { | ||
[styles.activeButtonTheme]: activeTheme === 'dark', | ||
[styles.inactiveButtonTheme]: activeTheme !== 'dark', | ||
})} | ||
d="M7.5 5a7.5 7.5 0 0 0 9.679 7.179 7.5 7.5 0 1 1-9.357-9.357A7.499 7.499 0 0 0 7.5 5Z" | ||
/> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.svgThemeButton { | ||
width: 20px; | ||
height: 20px; | ||
} | ||
|
||
.pathSvgTheme { | ||
fill: none; | ||
stroke: currentcolor; | ||
stroke-width: 1.5; | ||
} | ||
|
||
.activeButtonTheme { | ||
stroke: #F1F1F1; | ||
} | ||
|
||
.inactiveButtonTheme { | ||
stroke: #656565; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
import svgLoader from 'vite-svg-loader'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react(), tsconfigPaths()], | ||
plugins: [react(), tsconfigPaths(), svgLoader()], | ||
base: '/fe-react-2024/', | ||
}); |