This commit is contained in:
Jorrin
2024-03-18 23:06:38 +01:00
parent ac0b23db62
commit 21ada8162e
6 changed files with 12804 additions and 885 deletions

View File

@@ -1,5 +1,4 @@
import React from "react"; import React from "react";
import { useTheme } from "tamagui"; import { useTheme } from "tamagui";
interface SvgTabBarIconProps { interface SvgTabBarIconProps {
@@ -12,7 +11,9 @@ export default function SvgTabBarIcon({
children, children,
}: SvgTabBarIconProps) { }: SvgTabBarIconProps) {
const theme = useTheme(); const theme = useTheme();
const fillColor = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val; const fillColor = focused
? theme.tabBarIconFocused.val
: theme.tabBarIcon.val;
if (React.isValidElement(children)) { if (React.isValidElement(children)) {
return React.cloneElement(children, { fillColor } as React.Attributes); return React.cloneElement(children, { fillColor } as React.Attributes);

View File

@@ -1,5 +1,4 @@
import { FontAwesome } from "@expo/vector-icons"; import { FontAwesome } from "@expo/vector-icons";
import { useTheme } from "tamagui"; import { useTheme } from "tamagui";
type Props = { type Props = {
@@ -8,6 +7,6 @@ type Props = {
export default function TabBarIcon({ focused, ...rest }: Props) { export default function TabBarIcon({ focused, ...rest }: Props) {
const theme = useTheme(); const theme = useTheme();
const color = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val const color = focused ? theme.tabBarIconFocused.val : theme.tabBarIcon.val;
return <FontAwesome color={color} size={24} {...rest} />; return <FontAwesome color={color} size={24} {...rest} />;
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
{ {
"extends": "@movie-web/tsconfig/base.json", "extends": "@movie-web/tsconfig/base.json",
"compilerOptions": { "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
}, },
"include": ["*.ts", "src"], "include": ["*.ts", "src"],
"exclude": ["node_modules"] "exclude": ["node_modules"],
} }

View File

@@ -38,6 +38,7 @@ const config = {
"**/.eslintrc.cjs", "**/.eslintrc.cjs",
"dist", "dist",
"pnpm-lock.yaml", "pnpm-lock.yaml",
"tamagui-web.css",
], ],
reportUnusedDisableDirectives: true, reportUnusedDisableDirectives: true,
}; };

View File

@@ -3,9 +3,7 @@
/** @type { PrettierConfig | SortImportsConfig } */ /** @type { PrettierConfig | SortImportsConfig } */
const config = { const config = {
plugins: [ plugins: ["@ianvs/prettier-plugin-sort-imports"],
"@ianvs/prettier-plugin-sort-imports",
],
importOrder: [ importOrder: [
"<TYPES>", "<TYPES>",
"^(react/(.*)$)|^(react$)|^(react-native(.*)$)", "^(react/(.*)$)|^(react$)|^(react-native(.*)$)",
@@ -22,6 +20,7 @@ const config = {
], ],
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
importOrderTypeScriptVersion: "4.4.0", importOrderTypeScriptVersion: "4.4.0",
ignorePatterns: ["tamagui-web.css"],
}; };
export default config; export default config;