From 870905d7b7e97238bd2b4c435d78a7f9d019d6d8 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 17 Jan 2025 13:10:51 +0800 Subject: [PATCH] feat: sync icons --- apps/mobile/src/icons/arrow_left_cute_re.tsx | 34 ++++++++++++++++++++ icons/mgc/arrow_left_cute_re.svg | 1 + icons/mgc/information_cute_re copy.svg | 1 - icons/mgc/time_cute_re copy.svg | 1 - package.json | 1 + scripts/svg-to-rn.ts | 2 +- 6 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 apps/mobile/src/icons/arrow_left_cute_re.tsx create mode 100644 icons/mgc/arrow_left_cute_re.svg delete mode 100644 icons/mgc/information_cute_re copy.svg delete mode 100644 icons/mgc/time_cute_re copy.svg diff --git a/apps/mobile/src/icons/arrow_left_cute_re.tsx b/apps/mobile/src/icons/arrow_left_cute_re.tsx new file mode 100644 index 000000000..ea884584c --- /dev/null +++ b/apps/mobile/src/icons/arrow_left_cute_re.tsx @@ -0,0 +1,34 @@ +import * as React from "react" +import Svg, { Path } from "react-native-svg" + +interface ArrowLeftCuteReIconProps { + width?: number + height?: number + color?: string +} + +export const ArrowLeftCuteReIcon = ({ + width = 24, + height = 24, + color = "#10161F", +}: ArrowLeftCuteReIconProps) => { + return ( + + + + + + ) +} diff --git a/icons/mgc/arrow_left_cute_re.svg b/icons/mgc/arrow_left_cute_re.svg new file mode 100644 index 000000000..e47da21a0 --- /dev/null +++ b/icons/mgc/arrow_left_cute_re.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/mgc/information_cute_re copy.svg b/icons/mgc/information_cute_re copy.svg deleted file mode 100644 index 1de415665..000000000 --- a/icons/mgc/information_cute_re copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/icons/mgc/time_cute_re copy.svg b/icons/mgc/time_cute_re copy.svg deleted file mode 100644 index fcab9f21e..000000000 --- a/icons/mgc/time_cute_re copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/package.json b/package.json index 64f752596..286f1e2f4 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "publish": "electron-vite build && electron-forge publish", "start": "electron-vite preview", "sync:ab": "tsx scripts/pull-ab-flags.ts", + "sync:icons": "tsx scripts/svg-to-rn.ts && prettier --write apps/mobile/src/icons/**/*.tsx", "test": "CI=1 pnpm --recursive run test", "typecheck": "turbo typecheck", "update:main-hash": "tsx plugins/vite/generate-main-hash.ts" diff --git a/scripts/svg-to-rn.ts b/scripts/svg-to-rn.ts index 12306ffff..88538bc1e 100644 --- a/scripts/svg-to-rn.ts +++ b/scripts/svg-to-rn.ts @@ -59,7 +59,7 @@ interface ${componentName}Props { export const ${componentName} = ({ width = ${width}, height = ${height}, - color = "${DEFAULT_COLOR}", + ${pathElements.includes(`{color}`) ? `color = "${DEFAULT_COLOR}",` : ""} }: ${componentName}Props) => { return (