@tamagui/helpers-tamagui 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n ColorTokens,\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n ColorTokens,\n UnionableString,\n Variable,\n useTheme,\n variableToString,\n} from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n return variableToString(theme[colorProp as any] || colorProp || theme.color)\n}\n\nexport type ColorProp =\n | UnionableString\n | Variable\n | ColorTokens\n | TextStyle['color']\n | undefined\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,sBAAS;AACvB,aAAO,8BAAiB,MAAM,SAAgB,KAAK,aAAa,MAAM,KAAK;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n ColorTokens,\n
|
|
5
|
-
"mappings": "AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n ColorTokens,\n UnionableString,\n Variable,\n useTheme,\n variableToString,\n} from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n return variableToString(theme[colorProp as any] || colorProp || theme.color)\n}\n\nexport type ColorProp =\n | UnionableString\n | Variable\n | ColorTokens\n | TextStyle['color']\n | undefined\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AACvB,SAAO,iBAAiB,MAAM,SAAgB,KAAK,aAAa,MAAM,KAAK;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-tamagui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tamagui/core": "^1.1.
|
|
23
|
-
"@tamagui/helpers": "^1.1.
|
|
22
|
+
"@tamagui/core": "^1.1.12",
|
|
23
|
+
"@tamagui/helpers": "^1.1.12"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "^1.1.
|
|
26
|
+
"@tamagui/build": "^1.1.12",
|
|
27
27
|
"react": "^18.2.0",
|
|
28
28
|
"react-native": "*",
|
|
29
29
|
"vitest": "^0.26.3"
|
package/src/useCurrentColor.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ColorTokens,
|
|
3
|
-
|
|
3
|
+
UnionableString,
|
|
4
|
+
Variable,
|
|
4
5
|
useTheme,
|
|
5
6
|
variableToString,
|
|
6
7
|
} from '@tamagui/core'
|
|
@@ -11,4 +12,9 @@ export const useCurrentColor = (colorProp: ColorProp) => {
|
|
|
11
12
|
return variableToString(theme[colorProp as any] || colorProp || theme.color)
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export type ColorProp =
|
|
15
|
+
export type ColorProp =
|
|
16
|
+
| UnionableString
|
|
17
|
+
| Variable
|
|
18
|
+
| ColorTokens
|
|
19
|
+
| TextStyle['color']
|
|
20
|
+
| undefined
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColorTokens,
|
|
1
|
+
import { ColorTokens, UnionableString, Variable } from '@tamagui/core';
|
|
2
2
|
import type { TextStyle } from 'react-native';
|
|
3
3
|
export declare const useCurrentColor: (colorProp: ColorProp) => string;
|
|
4
|
-
export type ColorProp =
|
|
4
|
+
export type ColorProp = UnionableString | Variable | ColorTokens | TextStyle['color'] | undefined;
|
|
5
5
|
//# sourceMappingURL=useCurrentColor.d.ts.map
|