From b81babaccfa5ed0cf394dd8862ff012533d17213 Mon Sep 17 00:00:00 2001 From: Bibazavr Date: Thu, 27 Jun 2024 08:56:39 +0300 Subject: [PATCH] feat: add TablerIcons #255 --- packages/core/package.json | 11 ++-- packages/core/src/styles/icons/index.ts | 2 + .../MainStack/Home/Core/Styles/ui/index.tsx | 2 + .../Core/Styles/ui/TablerIconWidget.tsx | 56 +++++++++++++++++++ yarn.lock | 12 ++++ 5 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 src/widgets/Core/Styles/ui/TablerIconWidget.tsx diff --git a/packages/core/package.json b/packages/core/package.json index fe8ddc864..201fa7622 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,10 +30,13 @@ "author": "Kirill Lebedev ", "license": "MIT", "peerDependencies": { - "react-native": ">=0.66.4", "react": ">=17.0.2", + "react-native": ">=0.66.4", + "react-native-safe-area-context": ">=4.4.1", "react-native-svg": ">=12.3.0", - "react-native-svg-transformer": ">=1.0.0", - "react-native-safe-area-context": ">=4.4.1" + "react-native-svg-transformer": ">=1.0.0" + }, + "dependencies": { + "@tabler/icons-react-native": "^3.7.0" } -} \ No newline at end of file +} diff --git a/packages/core/src/styles/icons/index.ts b/packages/core/src/styles/icons/index.ts index e32c36e0f..f08e652eb 100644 --- a/packages/core/src/styles/icons/index.ts +++ b/packages/core/src/styles/icons/index.ts @@ -1,2 +1,4 @@ export * from './font'; export * from './svg'; + +export * from '@tabler/icons-react-native'; diff --git a/src/pages/MainStack/Home/Core/Styles/ui/index.tsx b/src/pages/MainStack/Home/Core/Styles/ui/index.tsx index 6943d6295..cb6c81d65 100644 --- a/src/pages/MainStack/Home/Core/Styles/ui/index.tsx +++ b/src/pages/MainStack/Home/Core/Styles/ui/index.tsx @@ -2,6 +2,7 @@ import {FlatList, useStyles, View} from '@shared/ui'; import getScreenStyles from '@shared/styles/getScreenStyles'; import {ShadowWidget} from '@widgets/Core/Styles/ui/ShadowWidget'; import {SimpleIconWidget} from '@widgets/Core/Styles/ui/SimpleIconWidget'; +import {TablerIconWidget} from '@widgets/Core/Styles/ui/TablerIconWidget'; const renderItem = () => ; @@ -16,6 +17,7 @@ const StylesScreen = () => { ListFooterComponent={ <> + } diff --git a/src/widgets/Core/Styles/ui/TablerIconWidget.tsx b/src/widgets/Core/Styles/ui/TablerIconWidget.tsx new file mode 100644 index 000000000..be3a6a4fa --- /dev/null +++ b/src/widgets/Core/Styles/ui/TablerIconWidget.tsx @@ -0,0 +1,56 @@ +import { + createStyles, + IconArrowUp, + IconAvocado, + IconBackpack, + useStyles, + View, +} from '@shared/ui'; +import Header from '@shared/ui/Header'; + +export const TablerIconWidget = () => { + const [styles] = useStyles(style); + return ( + +
+ + + + + + + ); +}; + +const style = createStyles(({shadows, spaces, colors}) => ({ + container: { + alignItems: 'center', + justifyContent: 'space-between', + }, + content: { + flexDirection: 'row', + flexWrap: 'wrap', + alignItems: 'center', + justifyContent: 'space-between', + + gap: spaces.Space12, + }, + item: { + alignItems: 'center', + }, + box: { + backgroundColor: colors.BgSecondary, + margin: spaces.Space8, + height: spaces.Space64, + width: spaces.Space64, + }, + shadowSmall: { + ...shadows.small, + }, + shadowMedium: { + ...shadows.medium, + }, + shadowLarge: { + ...shadows.large, + }, +})); diff --git a/yarn.lock b/yarn.lock index 525a22b73..a2e5d883b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3006,6 +3006,18 @@ deepmerge "^4.3.1" svgo "^3.0.2" +"@tabler/icons-react-native@^3.7.0": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@tabler/icons-react-native/-/icons-react-native-3.7.0.tgz#e44c6dd54ab82d705625642e50e160ddab8b1ab6" + integrity sha512-kIy6JF75y3m70mhCOTaT3V1FERVOxPZ7IcvjAaO96YTaweHk7B+W2f2Ptd+hSHBVeA0nRHsK0wb8ZY9Wt6i5vA== + dependencies: + "@tabler/icons" "3.7.0" + +"@tabler/icons@3.7.0": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-3.7.0.tgz#b522723844644b50ccaddd0fd19a91c0eb3095da" + integrity sha512-lJGIZLSWrPO6VygRUbaVvQjWgL2EaiBMD8e6leCYUQ8ZPO4LIzKMq358C8KlhXJcyNiRz1Io3YWoc/DNTcWqSg== + "@testing-library/react-hooks@^8.0.0": version "8.0.1" resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-8.0.1.tgz#0924bbd5b55e0c0c0502d1754657ada66947ca12"