@draftbit/core 46.10.3-1ab4b6.2 → 46.10.3-258cfa.2
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/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +2 -17
- package/lib/commonjs/components/Shadow.js +2 -15
- package/lib/commonjs/components/Table/Table.js +5 -7
- package/lib/commonjs/components/Table/TableCell.js +3 -3
- package/lib/commonjs/components/Table/TableRow.js +4 -4
- package/lib/commonjs/components/Table/index.js +25 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/Layout.js +177 -85
- package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
- package/lib/module/components/Table/Table.js +5 -5
- package/lib/module/components/Table/TableCell.js +1 -1
- package/lib/module/components/Table/TableRow.js +1 -1
- package/lib/module/components/Table/index.js +21 -0
- package/lib/module/mappings/Layout.js +178 -86
- package/lib/module/mappings/NativeBase/Layout.js +101 -0
- package/lib/typescript/src/components/Table/Table.d.ts +3 -7
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/index.d.ts +18 -0
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Layout.d.ts +108 -72
- package/lib/typescript/src/mappings/Layout.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/components/Table/Table.js +3 -4
- package/src/components/Table/Table.tsx +3 -7
- package/src/components/Table/TableCell.js +1 -1
- package/src/components/Table/TableCell.tsx +1 -5
- package/src/components/Table/TableRow.js +1 -1
- package/src/components/Table/TableRow.tsx +1 -1
- package/src/components/Table/index.js +12 -0
- package/src/components/Table/index.tsx +41 -0
- package/src/mappings/Layout.js +176 -100
- package/src/mappings/Layout.ts +178 -116
- package/src/mappings/NativeBase/Layout.js +124 -0
- package/src/mappings/NativeBase/Layout.ts +145 -0
- package/lib/commonjs/components/Table/TableCommon.js +0 -30
- package/lib/module/components/Table/TableCommon.js +0 -21
- package/lib/typescript/src/components/Table/TableCommon.d.ts +0 -20
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +0 -1
- package/src/components/Table/TableCommon.js +0 -12
- package/src/components/Table/TableCommon.ts +0 -40
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
|
|
2
|
+
const SHARED_SEED_DATA = {
|
|
3
|
+
category: COMPONENT_TYPES.layout,
|
|
4
|
+
packageName: "native-base",
|
|
5
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
6
|
+
};
|
|
7
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter((item) => item !== StylesPanelSections.LayoutFlexItems &&
|
|
8
|
+
item !== StylesPanelSections.LayoutContent);
|
|
9
|
+
export const SEED_DATA = [
|
|
10
|
+
{
|
|
11
|
+
name: "Aspect Ratio",
|
|
12
|
+
tag: "AspectRatio",
|
|
13
|
+
description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
14
|
+
...SHARED_SEED_DATA,
|
|
15
|
+
props: {
|
|
16
|
+
ratio: createStaticNumberProp({
|
|
17
|
+
label: "Ratio",
|
|
18
|
+
description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
19
|
+
defaultValue: 1.33,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
stylesPanelSections: [
|
|
23
|
+
StylesPanelSections.Background,
|
|
24
|
+
StylesPanelSections.Size,
|
|
25
|
+
StylesPanelSections.Margins,
|
|
26
|
+
StylesPanelSections.Position,
|
|
27
|
+
StylesPanelSections.Borders,
|
|
28
|
+
StylesPanelSections.Effects,
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "Box",
|
|
33
|
+
tag: "Box",
|
|
34
|
+
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
35
|
+
...SHARED_SEED_DATA,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "Center",
|
|
39
|
+
tag: "Center",
|
|
40
|
+
description: "Center aligns its contents to the center within itself",
|
|
41
|
+
...SHARED_SEED_DATA,
|
|
42
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Circle",
|
|
46
|
+
tag: "Circle",
|
|
47
|
+
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
48
|
+
...SHARED_SEED_DATA,
|
|
49
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Container",
|
|
53
|
+
tag: "Container",
|
|
54
|
+
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
55
|
+
props: {
|
|
56
|
+
centerContent: createStaticBoolProp({
|
|
57
|
+
label: "Center content",
|
|
58
|
+
description: "Center child elements based on their content width",
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
...SHARED_SEED_DATA,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "Column",
|
|
66
|
+
tag: "Column",
|
|
67
|
+
description: "Column aligns items vertically",
|
|
68
|
+
layout: {
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
},
|
|
71
|
+
...SHARED_SEED_DATA,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "Row",
|
|
75
|
+
tag: "Row",
|
|
76
|
+
description: "Column aligns items horizontally",
|
|
77
|
+
layout: {
|
|
78
|
+
flexDirection: "row",
|
|
79
|
+
},
|
|
80
|
+
...SHARED_SEED_DATA,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "Spacer",
|
|
84
|
+
tag: "Spacer",
|
|
85
|
+
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
86
|
+
layout: {
|
|
87
|
+
flex: 1,
|
|
88
|
+
},
|
|
89
|
+
...SHARED_SEED_DATA,
|
|
90
|
+
stylesPanelSections: [
|
|
91
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
92
|
+
StylesPanelSections.Background,
|
|
93
|
+
StylesPanelSections.Margins,
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "Stack",
|
|
98
|
+
tag: "Stack",
|
|
99
|
+
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
100
|
+
...SHARED_SEED_DATA,
|
|
101
|
+
props: {
|
|
102
|
+
isDisabled: createBoolProp({
|
|
103
|
+
label: "Disabled",
|
|
104
|
+
description: "If true, the Stack will be disabled",
|
|
105
|
+
}),
|
|
106
|
+
isInvalid: createBoolProp({
|
|
107
|
+
label: "Invalid",
|
|
108
|
+
description: "If true, the Stack will be invalid",
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "ZStack",
|
|
114
|
+
tag: "ZStack",
|
|
115
|
+
description: "ZStack aligns items to the z-axis",
|
|
116
|
+
...SHARED_SEED_DATA,
|
|
117
|
+
props: {
|
|
118
|
+
reversed: createBoolProp({
|
|
119
|
+
label: "Reversed",
|
|
120
|
+
description: "Determines whether to reverse the direction of items",
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
];
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
createBoolProp,
|
|
4
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
5
|
+
createStaticNumberProp,
|
|
6
|
+
StylesPanelSections,
|
|
7
|
+
createStaticBoolProp,
|
|
8
|
+
} from "@draftbit/types";
|
|
9
|
+
|
|
10
|
+
const SHARED_SEED_DATA = {
|
|
11
|
+
category: COMPONENT_TYPES.layout,
|
|
12
|
+
packageName: "native-base",
|
|
13
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
|
|
17
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
|
|
18
|
+
(item) =>
|
|
19
|
+
item !== StylesPanelSections.LayoutFlexItems &&
|
|
20
|
+
item !== StylesPanelSections.LayoutContent
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const SEED_DATA = [
|
|
24
|
+
{
|
|
25
|
+
name: "Aspect Ratio",
|
|
26
|
+
tag: "AspectRatio",
|
|
27
|
+
description:
|
|
28
|
+
"Controls the size of the undefined dimension of a node or child component using an aspect ratio",
|
|
29
|
+
...SHARED_SEED_DATA,
|
|
30
|
+
props: {
|
|
31
|
+
ratio: createStaticNumberProp({
|
|
32
|
+
label: "Ratio",
|
|
33
|
+
description:
|
|
34
|
+
"The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
|
|
35
|
+
defaultValue: 1.33,
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
stylesPanelSections: [
|
|
39
|
+
StylesPanelSections.Background,
|
|
40
|
+
StylesPanelSections.Size,
|
|
41
|
+
StylesPanelSections.Margins,
|
|
42
|
+
StylesPanelSections.Position,
|
|
43
|
+
StylesPanelSections.Borders,
|
|
44
|
+
StylesPanelSections.Effects,
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "Box",
|
|
49
|
+
tag: "Box",
|
|
50
|
+
description:
|
|
51
|
+
"This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
52
|
+
...SHARED_SEED_DATA,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Center",
|
|
56
|
+
tag: "Center",
|
|
57
|
+
description: "Center aligns its contents to the center within itself",
|
|
58
|
+
...SHARED_SEED_DATA,
|
|
59
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "Circle",
|
|
63
|
+
tag: "Circle",
|
|
64
|
+
description:
|
|
65
|
+
"Center aligns its contents to the center within itself with a round border radius",
|
|
66
|
+
...SHARED_SEED_DATA,
|
|
67
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "Container",
|
|
71
|
+
tag: "Container",
|
|
72
|
+
description:
|
|
73
|
+
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
74
|
+
props: {
|
|
75
|
+
centerContent: createStaticBoolProp({
|
|
76
|
+
label: "Center content",
|
|
77
|
+
description: "Center child elements based on their content width",
|
|
78
|
+
defaultValue: true,
|
|
79
|
+
}),
|
|
80
|
+
},
|
|
81
|
+
...SHARED_SEED_DATA,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "Column",
|
|
85
|
+
tag: "Column",
|
|
86
|
+
description: "Column aligns items vertically",
|
|
87
|
+
layout: {
|
|
88
|
+
flexDirection: "column",
|
|
89
|
+
},
|
|
90
|
+
...SHARED_SEED_DATA,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "Row",
|
|
94
|
+
tag: "Row",
|
|
95
|
+
description: "Column aligns items horizontally",
|
|
96
|
+
layout: {
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
},
|
|
99
|
+
...SHARED_SEED_DATA,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "Spacer",
|
|
103
|
+
tag: "Spacer",
|
|
104
|
+
description:
|
|
105
|
+
"An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
106
|
+
layout: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
},
|
|
109
|
+
...SHARED_SEED_DATA,
|
|
110
|
+
stylesPanelSections: [
|
|
111
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
112
|
+
StylesPanelSections.Background,
|
|
113
|
+
StylesPanelSections.Margins,
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "Stack",
|
|
118
|
+
tag: "Stack",
|
|
119
|
+
description:
|
|
120
|
+
"Stack aligns items vertically or horizontally based on the direction prop",
|
|
121
|
+
...SHARED_SEED_DATA,
|
|
122
|
+
props: {
|
|
123
|
+
isDisabled: createBoolProp({
|
|
124
|
+
label: "Disabled",
|
|
125
|
+
description: "If true, the Stack will be disabled",
|
|
126
|
+
}),
|
|
127
|
+
isInvalid: createBoolProp({
|
|
128
|
+
label: "Invalid",
|
|
129
|
+
description: "If true, the Stack will be invalid",
|
|
130
|
+
}),
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "ZStack",
|
|
135
|
+
tag: "ZStack",
|
|
136
|
+
description: "ZStack aligns items to the z-axis",
|
|
137
|
+
...SHARED_SEED_DATA,
|
|
138
|
+
props: {
|
|
139
|
+
reversed: createBoolProp({
|
|
140
|
+
label: "Reversed",
|
|
141
|
+
description: "Determines whether to reverse the direction of items",
|
|
142
|
+
}),
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TableStyleContext = void 0;
|
|
7
|
-
exports.generateBorderStyles = generateBorderStyles;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const TableStyleContext = /*#__PURE__*/_react.default.createContext({});
|
|
11
|
-
exports.TableStyleContext = TableStyleContext;
|
|
12
|
-
function generateBorderStyles(_ref) {
|
|
13
|
-
let {
|
|
14
|
-
borderColor,
|
|
15
|
-
borderWidth,
|
|
16
|
-
borderStyle,
|
|
17
|
-
drawTopBorder,
|
|
18
|
-
drawBottomBorder,
|
|
19
|
-
drawStartBorder,
|
|
20
|
-
drawEndBorder
|
|
21
|
-
} = _ref;
|
|
22
|
-
return {
|
|
23
|
-
borderColor,
|
|
24
|
-
borderStyle,
|
|
25
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
26
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
27
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
28
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0
|
|
29
|
-
};
|
|
30
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const TableStyleContext = /*#__PURE__*/React.createContext({});
|
|
3
|
-
export function generateBorderStyles(_ref) {
|
|
4
|
-
let {
|
|
5
|
-
borderColor,
|
|
6
|
-
borderWidth,
|
|
7
|
-
borderStyle,
|
|
8
|
-
drawTopBorder,
|
|
9
|
-
drawBottomBorder,
|
|
10
|
-
drawStartBorder,
|
|
11
|
-
drawEndBorder
|
|
12
|
-
} = _ref;
|
|
13
|
-
return {
|
|
14
|
-
borderColor,
|
|
15
|
-
borderStyle,
|
|
16
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
17
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
18
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
19
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ViewStyle } from "react-native";
|
|
3
|
-
declare type BorderStyle = "solid" | "dotted" | "dashed";
|
|
4
|
-
export declare const TableStyleContext: React.Context<TableStyleProps>;
|
|
5
|
-
export interface TableStyleProps {
|
|
6
|
-
borderWidth?: number;
|
|
7
|
-
borderColor?: string;
|
|
8
|
-
borderStyle?: BorderStyle;
|
|
9
|
-
cellVerticalPadding?: number;
|
|
10
|
-
cellHorizontalPadding?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface TableProps extends TableStyleProps {
|
|
13
|
-
drawTopBorder?: boolean;
|
|
14
|
-
drawBottomBorder?: boolean;
|
|
15
|
-
drawStartBorder?: boolean;
|
|
16
|
-
drawEndBorder?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }: TableProps): ViewStyle;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=TableCommon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableCommon.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableCommon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,aAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD,eAAO,MAAM,iBAAiB,gCAA2C,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,EAAE,UAAU,GAAG,SAAS,CASxB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const TableStyleContext = React.createContext({});
|
|
3
|
-
export function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }) {
|
|
4
|
-
return {
|
|
5
|
-
borderColor,
|
|
6
|
-
borderStyle,
|
|
7
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
8
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
9
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
10
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ViewStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
type BorderStyle = "solid" | "dotted" | "dashed";
|
|
5
|
-
|
|
6
|
-
export const TableStyleContext = React.createContext<TableStyleProps>({});
|
|
7
|
-
|
|
8
|
-
export interface TableStyleProps {
|
|
9
|
-
borderWidth?: number;
|
|
10
|
-
borderColor?: string;
|
|
11
|
-
borderStyle?: BorderStyle;
|
|
12
|
-
cellVerticalPadding?: number;
|
|
13
|
-
cellHorizontalPadding?: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface TableProps extends TableStyleProps {
|
|
17
|
-
drawTopBorder?: boolean;
|
|
18
|
-
drawBottomBorder?: boolean;
|
|
19
|
-
drawStartBorder?: boolean;
|
|
20
|
-
drawEndBorder?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function generateBorderStyles({
|
|
24
|
-
borderColor,
|
|
25
|
-
borderWidth,
|
|
26
|
-
borderStyle,
|
|
27
|
-
drawTopBorder,
|
|
28
|
-
drawBottomBorder,
|
|
29
|
-
drawStartBorder,
|
|
30
|
-
drawEndBorder,
|
|
31
|
-
}: TableProps): ViewStyle {
|
|
32
|
-
return {
|
|
33
|
-
borderColor,
|
|
34
|
-
borderStyle,
|
|
35
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
36
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
37
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
38
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
39
|
-
};
|
|
40
|
-
}
|