@tamagui/linear-gradient 1.0.4 → 1.0.5
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.
- package/dist/cjs/LinearGradient.js +2 -57
- package/dist/cjs/LinearGradient.js.map +3 -3
- package/dist/cjs/LinearGradient.native.js +35 -0
- package/dist/cjs/LinearGradient.native.js.map +7 -0
- package/dist/cjs/LinearGradient.shared.js +74 -0
- package/dist/cjs/LinearGradient.shared.js.map +7 -0
- package/dist/esm/LinearGradient.js +1 -50
- package/dist/esm/LinearGradient.js.map +2 -2
- package/dist/esm/LinearGradient.native.js +11 -0
- package/dist/esm/LinearGradient.native.js.map +7 -0
- package/dist/esm/LinearGradient.shared.js +51 -0
- package/dist/esm/LinearGradient.shared.js.map +7 -0
- package/dist/jsx/LinearGradient.js +1 -38
- package/dist/jsx/LinearGradient.js.map +2 -2
- package/dist/jsx/LinearGradient.native.js +8 -0
- package/dist/jsx/LinearGradient.native.js.map +7 -0
- package/dist/jsx/LinearGradient.shared.js +39 -0
- package/dist/jsx/LinearGradient.shared.js.map +7 -0
- package/package.json +4 -4
- package/src/LinearGradient.native.tsx +12 -0
- package/src/LinearGradient.shared.tsx +64 -0
- package/src/LinearGradient.tsx +1 -64
- package/types/LinearGradient.d.ts +1 -9
- package/types/LinearGradient.native.d.ts +7 -0
- package/types/LinearGradient.shared.d.ts +10 -0
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
6
|
var __copyProps = (to, from, except, desc) => {
|
|
13
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
8
|
for (let key of __getOwnPropNames(from))
|
|
@@ -17,58 +11,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
11
|
}
|
|
18
12
|
return to;
|
|
19
13
|
};
|
|
20
|
-
var
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
24
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
16
|
var LinearGradient_exports = {};
|
|
26
|
-
__export(LinearGradient_exports, {
|
|
27
|
-
LinearGradient: () => LinearGradient
|
|
28
|
-
});
|
|
29
17
|
module.exports = __toCommonJS(LinearGradient_exports);
|
|
30
|
-
|
|
31
|
-
var import_core = require("@tamagui/core");
|
|
32
|
-
var import_stacks = require("@tamagui/stacks");
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react_native = require("react-native");
|
|
35
|
-
var import_linear_gradient = require("./linear-gradient");
|
|
36
|
-
const LinearGradient = import_stacks.YStack.extractable(
|
|
37
|
-
(0, import_core.themeable)(
|
|
38
|
-
React.forwardRef((props, ref) => {
|
|
39
|
-
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
40
|
-
const colors = useThemeColors(colorsProp || []);
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinearGradientFrame, {
|
|
42
|
-
ref,
|
|
43
|
-
...stackProps,
|
|
44
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
|
|
45
|
-
start,
|
|
46
|
-
end,
|
|
47
|
-
colors,
|
|
48
|
-
locations,
|
|
49
|
-
style: import_react_native.StyleSheet.absoluteFill,
|
|
50
|
-
children
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
})
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
const LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
57
|
-
name: "LinearGradient",
|
|
58
|
-
overflow: "hidden",
|
|
59
|
-
position: "relative"
|
|
60
|
-
});
|
|
61
|
-
const useThemeColors = (colors) => {
|
|
62
|
-
const theme = (0, import_core.useTheme)();
|
|
63
|
-
return colors.map((color) => {
|
|
64
|
-
if (color[0] === "$") {
|
|
65
|
-
return (0, import_core.getVariable)(theme[color] || color);
|
|
66
|
-
}
|
|
67
|
-
return color;
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
-
0 && (module.exports = {
|
|
72
|
-
LinearGradient
|
|
73
|
-
});
|
|
18
|
+
__reExport(LinearGradient_exports, require("./LinearGradient.shared"), module.exports);
|
|
74
19
|
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.tsx"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["export * from './LinearGradient.shared'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mCAAc,oCAAd;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var LinearGradient_native_exports = {};
|
|
20
|
+
__export(LinearGradient_native_exports, {
|
|
21
|
+
LinearGradient: () => LinearGradient
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(LinearGradient_native_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
function LinearGradient(props) {
|
|
26
|
+
const Real = require("./LinearGradient.shared").LinearGradient;
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Real, {
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
LinearGradient
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=LinearGradient.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Fake file require just so native users can avoid installing\n * expo stuff up front for native.\n */\n\nimport { View } from 'react-native'\n\nexport function LinearGradient(props) {\n const Real = require('./LinearGradient.shared').LinearGradient\n\n return <Real {...props} />\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUS;AAHF,SAAS,eAAe,OAAO;AACpC,QAAM,OAAO,QAAQ,yBAAyB,EAAE;AAEhD,SAAO,4CAAC;AAAA,IAAM,GAAG;AAAA,GAAO;AAC1B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var LinearGradient_shared_exports = {};
|
|
26
|
+
__export(LinearGradient_shared_exports, {
|
|
27
|
+
LinearGradient: () => LinearGradient
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(LinearGradient_shared_exports);
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var import_core = require("@tamagui/core");
|
|
32
|
+
var import_stacks = require("@tamagui/stacks");
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react_native = require("react-native");
|
|
35
|
+
var import_linear_gradient = require("./linear-gradient");
|
|
36
|
+
const LinearGradient = import_stacks.YStack.extractable(
|
|
37
|
+
(0, import_core.themeable)(
|
|
38
|
+
React.forwardRef((props, ref) => {
|
|
39
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
40
|
+
const colors = useThemeColors(colorsProp || []);
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinearGradientFrame, {
|
|
42
|
+
ref,
|
|
43
|
+
...stackProps,
|
|
44
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
|
|
45
|
+
start,
|
|
46
|
+
end,
|
|
47
|
+
colors,
|
|
48
|
+
locations,
|
|
49
|
+
style: import_react_native.StyleSheet.absoluteFill,
|
|
50
|
+
children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
})
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
const LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
57
|
+
name: "LinearGradient",
|
|
58
|
+
overflow: "hidden",
|
|
59
|
+
position: "relative"
|
|
60
|
+
});
|
|
61
|
+
const useThemeColors = (colors) => {
|
|
62
|
+
const theme = (0, import_core.useTheme)();
|
|
63
|
+
return colors.map((color) => {
|
|
64
|
+
if (color[0] === "$") {
|
|
65
|
+
return (0, import_core.getVariable)(theme[color] || color);
|
|
66
|
+
}
|
|
67
|
+
return color;
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
LinearGradient
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=LinearGradient.shared.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
+
"sourcesContent": ["import {\n ColorTokens,\n ThemeTokens,\n getVariable,\n styled,\n themeable,\n useTheme,\n} from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nimport {\n LinearGradient as ExpoLinearGradient,\n LinearGradientProps as ExpoLinearGradientProps,\n} from './linear-gradient'\n\n//\nexport type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &\n Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {\n colors?: (ColorTokens | ThemeTokens | (string & {}))[]\n }\n\nexport const LinearGradient: React.ForwardRefExoticComponent<\n LinearGradientProps & React.RefAttributes<HTMLElement | View>\n> = YStack.extractable(\n themeable(\n React.forwardRef((props: LinearGradientProps, ref) => {\n const { start, end, colors: colorsProp, locations, children, ...stackProps } = props\n const colors = useThemeColors(colorsProp || [])\n return (\n // @ts-ignore\n <LinearGradientFrame ref={ref} {...stackProps}>\n <ExpoLinearGradient\n start={start}\n end={end}\n colors={colors}\n locations={locations}\n style={StyleSheet.absoluteFill}\n >\n {children}\n </ExpoLinearGradient>\n </LinearGradientFrame>\n )\n })\n )\n) as any\n\nconst LinearGradientFrame = styled(YStack, {\n name: 'LinearGradient',\n overflow: 'hidden',\n position: 'relative',\n})\n\n// resolve tamagui theme values\nconst useThemeColors = (colors: string[]) => {\n const theme = useTheme()\n return colors.map((color) => {\n if (color[0] === '$') {\n return getVariable(theme[color] || color)\n }\n return color\n })\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCU;AAjCV,kBAOO;AACP,oBAAoC;AACpC,YAAuB;AACvB,0BAAiC;AAEjC,6BAGO;AAQA,MAAM,iBAET,qBAAO;AAAA,MACT;AAAA,IACE,MAAM,WAAW,CAAC,OAA4B,QAAQ;AACpD,YAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,aAAa,WAAW,IAAI;AAC/E,YAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,aAEE,4CAAC;AAAA,QAAoB;AAAA,QAAW,GAAG;AAAA,QACjC,sDAAC,uBAAAA,gBAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO,+BAAW;AAAA,UAEjB;AAAA,SACH;AAAA,OACF;AAAA,IAEJ,CAAC;AAAA,EACH;AACF;AAEA,MAAM,0BAAsB,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGD,MAAM,iBAAiB,CAAC,WAAqB;AAC3C,QAAM,YAAQ,sBAAS;AACvB,SAAO,OAAO,IAAI,CAAC,UAAU;AAC3B,QAAI,MAAM,OAAO,KAAK;AACpB,iBAAO,yBAAY,MAAM,UAAU,KAAK;AAAA,IAC1C;AACA,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
6
|
+
"names": ["ExpoLinearGradient"]
|
|
7
|
+
}
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
getVariable,
|
|
4
|
-
styled,
|
|
5
|
-
themeable,
|
|
6
|
-
useTheme
|
|
7
|
-
} from "@tamagui/core";
|
|
8
|
-
import { YStack } from "@tamagui/stacks";
|
|
9
|
-
import * as React from "react";
|
|
10
|
-
import { StyleSheet } from "react-native";
|
|
11
|
-
import {
|
|
12
|
-
LinearGradient as ExpoLinearGradient
|
|
13
|
-
} from "./linear-gradient";
|
|
14
|
-
const LinearGradient = YStack.extractable(
|
|
15
|
-
themeable(
|
|
16
|
-
React.forwardRef((props, ref) => {
|
|
17
|
-
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
18
|
-
const colors = useThemeColors(colorsProp || []);
|
|
19
|
-
return /* @__PURE__ */ jsx(LinearGradientFrame, {
|
|
20
|
-
ref,
|
|
21
|
-
...stackProps,
|
|
22
|
-
children: /* @__PURE__ */ jsx(ExpoLinearGradient, {
|
|
23
|
-
start,
|
|
24
|
-
end,
|
|
25
|
-
colors,
|
|
26
|
-
locations,
|
|
27
|
-
style: StyleSheet.absoluteFill,
|
|
28
|
-
children
|
|
29
|
-
})
|
|
30
|
-
});
|
|
31
|
-
})
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
const LinearGradientFrame = styled(YStack, {
|
|
35
|
-
name: "LinearGradient",
|
|
36
|
-
overflow: "hidden",
|
|
37
|
-
position: "relative"
|
|
38
|
-
});
|
|
39
|
-
const useThemeColors = (colors) => {
|
|
40
|
-
const theme = useTheme();
|
|
41
|
-
return colors.map((color) => {
|
|
42
|
-
if (color[0] === "$") {
|
|
43
|
-
return getVariable(theme[color] || color);
|
|
44
|
-
}
|
|
45
|
-
return color;
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
export {
|
|
49
|
-
LinearGradient
|
|
50
|
-
};
|
|
1
|
+
export * from "./LinearGradient.shared";
|
|
51
2
|
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.tsx"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './LinearGradient.shared'\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function LinearGradient(props) {
|
|
3
|
+
const Real = require("./LinearGradient.shared").LinearGradient;
|
|
4
|
+
return /* @__PURE__ */ jsx(Real, {
|
|
5
|
+
...props
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
LinearGradient
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=LinearGradient.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Fake file require just so native users can avoid installing\n * expo stuff up front for native.\n */\n\nimport { View } from 'react-native'\n\nexport function LinearGradient(props) {\n const Real = require('./LinearGradient.shared').LinearGradient\n\n return <Real {...props} />\n}\n"],
|
|
5
|
+
"mappings": "AAUS;AAHF,SAAS,eAAe,OAAO;AACpC,QAAM,OAAO,QAAQ,yBAAyB,EAAE;AAEhD,SAAO,oBAAC;AAAA,IAAM,GAAG;AAAA,GAAO;AAC1B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
getVariable,
|
|
4
|
+
styled,
|
|
5
|
+
themeable,
|
|
6
|
+
useTheme
|
|
7
|
+
} from "@tamagui/core";
|
|
8
|
+
import { YStack } from "@tamagui/stacks";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { StyleSheet } from "react-native";
|
|
11
|
+
import {
|
|
12
|
+
LinearGradient as ExpoLinearGradient
|
|
13
|
+
} from "./linear-gradient";
|
|
14
|
+
const LinearGradient = YStack.extractable(
|
|
15
|
+
themeable(
|
|
16
|
+
React.forwardRef((props, ref) => {
|
|
17
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
18
|
+
const colors = useThemeColors(colorsProp || []);
|
|
19
|
+
return /* @__PURE__ */ jsx(LinearGradientFrame, {
|
|
20
|
+
ref,
|
|
21
|
+
...stackProps,
|
|
22
|
+
children: /* @__PURE__ */ jsx(ExpoLinearGradient, {
|
|
23
|
+
start,
|
|
24
|
+
end,
|
|
25
|
+
colors,
|
|
26
|
+
locations,
|
|
27
|
+
style: StyleSheet.absoluteFill,
|
|
28
|
+
children
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
})
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
const LinearGradientFrame = styled(YStack, {
|
|
35
|
+
name: "LinearGradient",
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
position: "relative"
|
|
38
|
+
});
|
|
39
|
+
const useThemeColors = (colors) => {
|
|
40
|
+
const theme = useTheme();
|
|
41
|
+
return colors.map((color) => {
|
|
42
|
+
if (color[0] === "$") {
|
|
43
|
+
return getVariable(theme[color] || color);
|
|
44
|
+
}
|
|
45
|
+
return color;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
LinearGradient
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=LinearGradient.shared.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
+
"sourcesContent": ["import {\n ColorTokens,\n ThemeTokens,\n getVariable,\n styled,\n themeable,\n useTheme,\n} from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nimport {\n LinearGradient as ExpoLinearGradient,\n LinearGradientProps as ExpoLinearGradientProps,\n} from './linear-gradient'\n\n//\nexport type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &\n Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {\n colors?: (ColorTokens | ThemeTokens | (string & {}))[]\n }\n\nexport const LinearGradient: React.ForwardRefExoticComponent<\n LinearGradientProps & React.RefAttributes<HTMLElement | View>\n> = YStack.extractable(\n themeable(\n React.forwardRef((props: LinearGradientProps, ref) => {\n const { start, end, colors: colorsProp, locations, children, ...stackProps } = props\n const colors = useThemeColors(colorsProp || [])\n return (\n // @ts-ignore\n <LinearGradientFrame ref={ref} {...stackProps}>\n <ExpoLinearGradient\n start={start}\n end={end}\n colors={colors}\n locations={locations}\n style={StyleSheet.absoluteFill}\n >\n {children}\n </ExpoLinearGradient>\n </LinearGradientFrame>\n )\n })\n )\n) as any\n\nconst LinearGradientFrame = styled(YStack, {\n name: 'LinearGradient',\n overflow: 'hidden',\n position: 'relative',\n})\n\n// resolve tamagui theme values\nconst useThemeColors = (colors: string[]) => {\n const theme = useTheme()\n return colors.map((color) => {\n if (color[0] === '$') {\n return getVariable(theme[color] || color)\n }\n return color\n })\n}\n"],
|
|
5
|
+
"mappings": "AAiCU;AAjCV;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAA2B;AACpC,YAAY,WAAW;AACvB,SAAS,kBAAwB;AAEjC;AAAA,EACE,kBAAkB;AAAA,OAEb;AAQA,MAAM,iBAET,OAAO;AAAA,EACT;AAAA,IACE,MAAM,WAAW,CAAC,OAA4B,QAAQ;AACpD,YAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,aAAa,WAAW,IAAI;AAC/E,YAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,aAEE,oBAAC;AAAA,QAAoB;AAAA,QAAW,GAAG;AAAA,QACjC,8BAAC;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO,WAAW;AAAA,UAEjB;AAAA,SACH;AAAA,OACF;AAAA,IAEJ,CAAC;AAAA,EACH;AACF;AAEA,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGD,MAAM,iBAAiB,CAAC,WAAqB;AAC3C,QAAM,QAAQ,SAAS;AACvB,SAAO,OAAO,IAAI,CAAC,UAAU;AAC3B,QAAI,MAAM,OAAO,KAAK;AACpB,aAAO,YAAY,MAAM,UAAU,KAAK;AAAA,IAC1C;AACA,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
getVariable,
|
|
3
|
-
styled,
|
|
4
|
-
themeable,
|
|
5
|
-
useTheme
|
|
6
|
-
} from "@tamagui/core";
|
|
7
|
-
import { YStack } from "@tamagui/stacks";
|
|
8
|
-
import * as React from "react";
|
|
9
|
-
import { StyleSheet } from "react-native";
|
|
10
|
-
import {
|
|
11
|
-
LinearGradient as ExpoLinearGradient
|
|
12
|
-
} from "./linear-gradient";
|
|
13
|
-
const LinearGradient = YStack.extractable(
|
|
14
|
-
themeable(
|
|
15
|
-
React.forwardRef((props, ref) => {
|
|
16
|
-
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
17
|
-
const colors = useThemeColors(colorsProp || []);
|
|
18
|
-
return <LinearGradientFrame ref={ref} {...stackProps}><ExpoLinearGradient start={start} end={end} colors={colors} locations={locations} style={StyleSheet.absoluteFill}>{children}</ExpoLinearGradient></LinearGradientFrame>;
|
|
19
|
-
})
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
const LinearGradientFrame = styled(YStack, {
|
|
23
|
-
name: "LinearGradient",
|
|
24
|
-
overflow: "hidden",
|
|
25
|
-
position: "relative"
|
|
26
|
-
});
|
|
27
|
-
const useThemeColors = (colors) => {
|
|
28
|
-
const theme = useTheme();
|
|
29
|
-
return colors.map((color) => {
|
|
30
|
-
if (color[0] === "$") {
|
|
31
|
-
return getVariable(theme[color] || color);
|
|
32
|
-
}
|
|
33
|
-
return color;
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
LinearGradient
|
|
38
|
-
};
|
|
1
|
+
export * from "./LinearGradient.shared";
|
|
39
2
|
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGradient.tsx"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "AAAA
|
|
4
|
+
"sourcesContent": ["export * from './LinearGradient.shared'\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Fake file require just so native users can avoid installing\n * expo stuff up front for native.\n */\n\nimport { View } from 'react-native'\n\nexport function LinearGradient(props) {\n const Real = require('./LinearGradient.shared').LinearGradient\n\n return <Real {...props} />\n}\n"],
|
|
5
|
+
"mappings": "AAOO,SAAS,eAAe,OAAO;AACpC,QAAM,OAAO,QAAQ,yBAAyB,EAAE;AAEhD,SAAO,CAAC,SAAS,OAAO;AAC1B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getVariable,
|
|
3
|
+
styled,
|
|
4
|
+
themeable,
|
|
5
|
+
useTheme
|
|
6
|
+
} from "@tamagui/core";
|
|
7
|
+
import { YStack } from "@tamagui/stacks";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { StyleSheet } from "react-native";
|
|
10
|
+
import {
|
|
11
|
+
LinearGradient as ExpoLinearGradient
|
|
12
|
+
} from "./linear-gradient";
|
|
13
|
+
const LinearGradient = YStack.extractable(
|
|
14
|
+
themeable(
|
|
15
|
+
React.forwardRef((props, ref) => {
|
|
16
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
|
|
17
|
+
const colors = useThemeColors(colorsProp || []);
|
|
18
|
+
return <LinearGradientFrame ref={ref} {...stackProps}><ExpoLinearGradient start={start} end={end} colors={colors} locations={locations} style={StyleSheet.absoluteFill}>{children}</ExpoLinearGradient></LinearGradientFrame>;
|
|
19
|
+
})
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
const LinearGradientFrame = styled(YStack, {
|
|
23
|
+
name: "LinearGradient",
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
position: "relative"
|
|
26
|
+
});
|
|
27
|
+
const useThemeColors = (colors) => {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
return colors.map((color) => {
|
|
30
|
+
if (color[0] === "$") {
|
|
31
|
+
return getVariable(theme[color] || color);
|
|
32
|
+
}
|
|
33
|
+
return color;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
LinearGradient
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=LinearGradient.shared.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.shared.tsx"],
|
|
4
|
+
"sourcesContent": ["import {\n ColorTokens,\n ThemeTokens,\n getVariable,\n styled,\n themeable,\n useTheme,\n} from '@tamagui/core'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport * as React from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nimport {\n LinearGradient as ExpoLinearGradient,\n LinearGradientProps as ExpoLinearGradientProps,\n} from './linear-gradient'\n\n//\nexport type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &\n Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {\n colors?: (ColorTokens | ThemeTokens | (string & {}))[]\n }\n\nexport const LinearGradient: React.ForwardRefExoticComponent<\n LinearGradientProps & React.RefAttributes<HTMLElement | View>\n> = YStack.extractable(\n themeable(\n React.forwardRef((props: LinearGradientProps, ref) => {\n const { start, end, colors: colorsProp, locations, children, ...stackProps } = props\n const colors = useThemeColors(colorsProp || [])\n return (\n // @ts-ignore\n <LinearGradientFrame ref={ref} {...stackProps}>\n <ExpoLinearGradient\n start={start}\n end={end}\n colors={colors}\n locations={locations}\n style={StyleSheet.absoluteFill}\n >\n {children}\n </ExpoLinearGradient>\n </LinearGradientFrame>\n )\n })\n )\n) as any\n\nconst LinearGradientFrame = styled(YStack, {\n name: 'LinearGradient',\n overflow: 'hidden',\n position: 'relative',\n})\n\n// resolve tamagui theme values\nconst useThemeColors = (colors: string[]) => {\n const theme = useTheme()\n return colors.map((color) => {\n if (color[0] === '$') {\n return getVariable(theme[color] || color)\n }\n return color\n })\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAA2B;AACpC,YAAY,WAAW;AACvB,SAAS,kBAAwB;AAEjC;AAAA,EACE,kBAAkB;AAAA,OAEb;AAQA,MAAM,iBAET,OAAO;AAAA,EACT;AAAA,IACE,MAAM,WAAW,CAAC,OAA4B,QAAQ;AACpD,YAAM,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,aAAa,WAAW,IAAI;AAC/E,YAAM,SAAS,eAAe,cAAc,CAAC,CAAC;AAC9C,aAEE,CAAC,oBAAoB,KAAK,SAAS,YACjC,CAAC,mBACC,OAAO,OACP,KAAK,KACL,QAAQ,QACR,WAAW,WACX,OAAO,WAAW,eAEjB,SACH,EARC,mBASH,EAVC;AAAA,IAYL,CAAC;AAAA,EACH;AACF;AAEA,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGD,MAAM,iBAAiB,CAAC,WAAqB;AAC3C,QAAM,QAAQ,SAAS;AACvB,SAAO,OAAO,IAAI,CAAC,UAAU;AAC3B,QAAI,MAAM,OAAO,KAAK;AACpB,aAAO,YAAY,MAAM,UAAU,KAAK;AAAA,IAC1C;AACA,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"lint:fix": "../../node_modules/.bin/rome check --apply-suggested src"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tamagui/core": "^1.0.
|
|
27
|
-
"@tamagui/stacks": "^1.0.
|
|
26
|
+
"@tamagui/core": "^1.0.5",
|
|
27
|
+
"@tamagui/stacks": "^1.0.5"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"expo-linear-gradient": "*",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": "*"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tamagui/build": "^1.0.
|
|
35
|
+
"@tamagui/build": "^1.0.5",
|
|
36
36
|
"expo-linear-gradient": "^12.0.1",
|
|
37
37
|
"react": "^18.2.0",
|
|
38
38
|
"react-dom": "^18.2.0"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fake file require just so native users can avoid installing
|
|
3
|
+
* expo stuff up front for native.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { View } from 'react-native'
|
|
7
|
+
|
|
8
|
+
export function LinearGradient(props) {
|
|
9
|
+
const Real = require('./LinearGradient.shared').LinearGradient
|
|
10
|
+
|
|
11
|
+
return <Real {...props} />
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ColorTokens,
|
|
3
|
+
ThemeTokens,
|
|
4
|
+
getVariable,
|
|
5
|
+
styled,
|
|
6
|
+
themeable,
|
|
7
|
+
useTheme,
|
|
8
|
+
} from '@tamagui/core'
|
|
9
|
+
import { YStack, YStackProps } from '@tamagui/stacks'
|
|
10
|
+
import * as React from 'react'
|
|
11
|
+
import { StyleSheet, View } from 'react-native'
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
LinearGradient as ExpoLinearGradient,
|
|
15
|
+
LinearGradientProps as ExpoLinearGradientProps,
|
|
16
|
+
} from './linear-gradient'
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &
|
|
20
|
+
Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {
|
|
21
|
+
colors?: (ColorTokens | ThemeTokens | (string & {}))[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const LinearGradient: React.ForwardRefExoticComponent<
|
|
25
|
+
LinearGradientProps & React.RefAttributes<HTMLElement | View>
|
|
26
|
+
> = YStack.extractable(
|
|
27
|
+
themeable(
|
|
28
|
+
React.forwardRef((props: LinearGradientProps, ref) => {
|
|
29
|
+
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props
|
|
30
|
+
const colors = useThemeColors(colorsProp || [])
|
|
31
|
+
return (
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
<LinearGradientFrame ref={ref} {...stackProps}>
|
|
34
|
+
<ExpoLinearGradient
|
|
35
|
+
start={start}
|
|
36
|
+
end={end}
|
|
37
|
+
colors={colors}
|
|
38
|
+
locations={locations}
|
|
39
|
+
style={StyleSheet.absoluteFill}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
</ExpoLinearGradient>
|
|
43
|
+
</LinearGradientFrame>
|
|
44
|
+
)
|
|
45
|
+
})
|
|
46
|
+
)
|
|
47
|
+
) as any
|
|
48
|
+
|
|
49
|
+
const LinearGradientFrame = styled(YStack, {
|
|
50
|
+
name: 'LinearGradient',
|
|
51
|
+
overflow: 'hidden',
|
|
52
|
+
position: 'relative',
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// resolve tamagui theme values
|
|
56
|
+
const useThemeColors = (colors: string[]) => {
|
|
57
|
+
const theme = useTheme()
|
|
58
|
+
return colors.map((color) => {
|
|
59
|
+
if (color[0] === '$') {
|
|
60
|
+
return getVariable(theme[color] || color)
|
|
61
|
+
}
|
|
62
|
+
return color
|
|
63
|
+
})
|
|
64
|
+
}
|
package/src/LinearGradient.tsx
CHANGED
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
ColorTokens,
|
|
3
|
-
ThemeTokens,
|
|
4
|
-
getVariable,
|
|
5
|
-
styled,
|
|
6
|
-
themeable,
|
|
7
|
-
useTheme,
|
|
8
|
-
} from '@tamagui/core'
|
|
9
|
-
import { YStack, YStackProps } from '@tamagui/stacks'
|
|
10
|
-
import * as React from 'react'
|
|
11
|
-
import { StyleSheet, View } from 'react-native'
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
LinearGradient as ExpoLinearGradient,
|
|
15
|
-
LinearGradientProps as ExpoLinearGradientProps,
|
|
16
|
-
} from './linear-gradient'
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> &
|
|
20
|
-
Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {
|
|
21
|
-
colors?: (ColorTokens | ThemeTokens | (string & {}))[]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const LinearGradient: React.ForwardRefExoticComponent<
|
|
25
|
-
LinearGradientProps & React.RefAttributes<HTMLElement | View>
|
|
26
|
-
> = YStack.extractable(
|
|
27
|
-
themeable(
|
|
28
|
-
React.forwardRef((props: LinearGradientProps, ref) => {
|
|
29
|
-
const { start, end, colors: colorsProp, locations, children, ...stackProps } = props
|
|
30
|
-
const colors = useThemeColors(colorsProp || [])
|
|
31
|
-
return (
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
<LinearGradientFrame ref={ref} {...stackProps}>
|
|
34
|
-
<ExpoLinearGradient
|
|
35
|
-
start={start}
|
|
36
|
-
end={end}
|
|
37
|
-
colors={colors}
|
|
38
|
-
locations={locations}
|
|
39
|
-
style={StyleSheet.absoluteFill}
|
|
40
|
-
>
|
|
41
|
-
{children}
|
|
42
|
-
</ExpoLinearGradient>
|
|
43
|
-
</LinearGradientFrame>
|
|
44
|
-
)
|
|
45
|
-
})
|
|
46
|
-
)
|
|
47
|
-
) as any
|
|
48
|
-
|
|
49
|
-
const LinearGradientFrame = styled(YStack, {
|
|
50
|
-
name: 'LinearGradient',
|
|
51
|
-
overflow: 'hidden',
|
|
52
|
-
position: 'relative',
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
// resolve tamagui theme values
|
|
56
|
-
const useThemeColors = (colors: string[]) => {
|
|
57
|
-
const theme = useTheme()
|
|
58
|
-
return colors.map((color) => {
|
|
59
|
-
if (color[0] === '$') {
|
|
60
|
-
return getVariable(theme[color] || color)
|
|
61
|
-
}
|
|
62
|
-
return color
|
|
63
|
-
})
|
|
64
|
-
}
|
|
1
|
+
export * from './LinearGradient.shared'
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { YStackProps } from '@tamagui/stacks';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
import { LinearGradientProps as ExpoLinearGradientProps } from './linear-gradient';
|
|
6
|
-
export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> & Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {
|
|
7
|
-
colors?: (ColorTokens | ThemeTokens | (string & {}))[];
|
|
8
|
-
};
|
|
9
|
-
export declare const LinearGradient: React.ForwardRefExoticComponent<LinearGradientProps & React.RefAttributes<HTMLElement | View>>;
|
|
1
|
+
export * from './LinearGradient.shared';
|
|
10
2
|
//# sourceMappingURL=LinearGradient.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColorTokens, ThemeTokens } from '@tamagui/core';
|
|
2
|
+
import { YStackProps } from '@tamagui/stacks';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { LinearGradientProps as ExpoLinearGradientProps } from './linear-gradient';
|
|
6
|
+
export type LinearGradientProps = Omit<ExpoLinearGradientProps, 'colors'> & Omit<YStackProps, 'children' | keyof ExpoLinearGradientProps> & {
|
|
7
|
+
colors?: (ColorTokens | ThemeTokens | (string & {}))[];
|
|
8
|
+
};
|
|
9
|
+
export declare const LinearGradient: React.ForwardRefExoticComponent<LinearGradientProps & React.RefAttributes<HTMLElement | View>>;
|
|
10
|
+
//# sourceMappingURL=LinearGradient.shared.d.ts.map
|