@draftbit/core 46.7.9-28aa70.2 → 46.7.9-3ec6a6.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.
@@ -12,7 +12,6 @@ var _theming = require("../../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
15
  const AccordionItem = _ref => {
17
16
  let {
18
17
  Icon,
@@ -27,9 +26,10 @@ const AccordionItem = _ref => {
27
26
  textStyles,
28
27
  viewStyles
29
28
  } = (0, _utilities.extractStyles)(style);
30
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
31
- style: [styles.container, viewStyles]
32
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
29
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
30
+ style: [styles.container, viewStyles],
31
+ ...rest
32
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
33
33
  style: styles.row
34
34
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
@@ -61,4 +61,23 @@ const styles = _reactNative.StyleSheet.create({
61
61
  }
62
62
  });
63
63
  var _default = (0, _theming.withTheme)(AccordionItem);
64
+ exports.default = _default;.StyleSheet.create({
65
+ container: {
66
+ padding: 8
67
+ },
68
+ row: {
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ paddingLeft: 8
72
+ },
73
+ item: {
74
+ marginVertical: 6,
75
+ paddingLeft: 8
76
+ },
77
+ content: {
78
+ flex: 1,
79
+ justifyContent: "center"
80
+ }
81
+ });
82
+ var _default = (0, _theming.withTheme)(AccordionItem);
64
83
  exports.default = _default;
@@ -26,12 +26,13 @@ const DeckSwiper = _ref => {
26
26
  const cardsFillerData = _react.default.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
27
27
 
28
28
  /**
29
- * By default react-native-deck-swiper positions everything with absolute position
30
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
29
+ * By default react-native-deck-swiper positions everything with absolute position.
30
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
31
31
  *
32
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
33
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
34
- * This effectivley makes the default height of the container be the height of the first card
32
+ *
33
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
34
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
35
+ * This effectivley makes the default height of the container be the height of the first card.
35
36
  */
36
37
 
37
38
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
@@ -17,7 +17,6 @@ const DeckSwiperCard = _ref => {
17
17
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
18
18
  style: [styles.card, {
19
19
  backgroundColor: theme.colors.background,
20
- borderRadius: theme.borderRadius.global,
21
20
  borderColor: theme.colors.divider
22
21
  }, style]
23
22
  }, children);
@@ -11,6 +11,9 @@ const SEED_DATA = {
11
11
  description: "Deck swiper container",
12
12
  category: _types.COMPONENT_TYPES.swiper,
13
13
  stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
14
+ layout: {
15
+ width: "100%"
16
+ },
14
17
  triggers: [_types.Triggers.OnIndexChanged, _types.Triggers.OnEndReached],
15
18
  props: {
16
19
  onIndexChanged: (0, _types.createActionProp)({
@@ -11,6 +11,13 @@ const SEED_DATA = {
11
11
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
12
12
  category: _types.COMPONENT_TYPES.swiper,
13
13
  stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ layout: {
15
+ flex: 1,
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ padding: 20,
19
+ borderWidth: 2
20
+ },
14
21
  props: {}
15
22
  };
16
23
  exports.SEED_DATA = SEED_DATA;
@@ -19,12 +19,13 @@ const DeckSwiper = _ref => {
19
19
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
20
20
 
21
21
  /**
22
- * By default react-native-deck-swiper positions everything with absolute position
23
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
22
+ * By default react-native-deck-swiper positions everything with absolute position.
23
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
24
24
  *
25
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
26
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
27
- * This effectivley makes the default height of the container be the height of the first card
25
+ *
26
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
27
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
28
+ * This effectivley makes the default height of the container be the height of the first card.
28
29
  */
29
30
 
30
31
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
@@ -10,7 +10,6 @@ const DeckSwiperCard = _ref => {
10
10
  return /*#__PURE__*/React.createElement(View, {
11
11
  style: [styles.card, {
12
12
  backgroundColor: theme.colors.background,
13
- borderRadius: theme.borderRadius.global,
14
13
  borderColor: theme.colors.divider
15
14
  }, style]
16
15
  }, children);
@@ -1,3 +1,6 @@
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
4
  // @ts-nocheck
2
5
  import React, { Component } from "react";
3
6
  import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
@@ -9,7 +12,7 @@ const STEP_STATUS = {
9
12
  export default class StepIndicator extends Component {
10
13
  constructor(props) {
11
14
  super(props);
12
- this.renderProgressBarBackground = () => {
15
+ _defineProperty(this, "renderProgressBarBackground", () => {
13
16
  const {
14
17
  stepCount,
15
18
  direction
@@ -52,8 +55,8 @@ export default class StepIndicator extends Component {
52
55
  },
53
56
  style: progressBarBackgroundStyle
54
57
  });
55
- };
56
- this.renderProgressBar = () => {
58
+ });
59
+ _defineProperty(this, "renderProgressBar", () => {
57
60
  const {
58
61
  stepCount,
59
62
  direction
@@ -83,8 +86,8 @@ export default class StepIndicator extends Component {
83
86
  return /*#__PURE__*/React.createElement(Animated.View, {
84
87
  style: progressBarStyle
85
88
  });
86
- };
87
- this.renderStepIndicator = () => {
89
+ });
90
+ _defineProperty(this, "renderStepIndicator", () => {
88
91
  let steps = [];
89
92
  const {
90
93
  stepCount,
@@ -115,8 +118,8 @@ export default class StepIndicator extends Component {
115
118
  height: this.state.customStyles.currentStepIndicatorSize
116
119
  }]
117
120
  }, steps);
118
- };
119
- this.renderStepLabels = () => {
121
+ });
122
+ _defineProperty(this, "renderStepLabels", () => {
120
123
  const {
121
124
  labels,
122
125
  direction,
@@ -158,8 +161,8 @@ export default class StepIndicator extends Component {
158
161
  alignItems: this.state.customStyles.labelAlign
159
162
  }]
160
163
  }, labelViews);
161
- };
162
- this.renderStep = position => {
164
+ });
165
+ _defineProperty(this, "renderStep", position => {
163
166
  const {
164
167
  renderStepIndicator
165
168
  } = this.props;
@@ -226,8 +229,8 @@ export default class StepIndicator extends Component {
226
229
  }) : /*#__PURE__*/React.createElement(Text, {
227
230
  style: indicatorLabelStyle
228
231
  }, "".concat(position + 1)));
229
- };
230
- this.getStepStatus = stepPosition => {
232
+ });
233
+ _defineProperty(this, "getStepStatus", stepPosition => {
231
234
  const {
232
235
  currentPosition
233
236
  } = this.props;
@@ -238,8 +241,8 @@ export default class StepIndicator extends Component {
238
241
  } else {
239
242
  return STEP_STATUS.UNFINISHED;
240
243
  }
241
- };
242
- this.onCurrentPositionChanged = position => {
244
+ });
245
+ _defineProperty(this, "onCurrentPositionChanged", position => {
243
246
  let {
244
247
  stepCount
245
248
  } = this.props;
@@ -259,7 +262,7 @@ export default class StepIndicator extends Component {
259
262
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
260
263
  duration: 100
261
264
  })])]).start();
262
- };
265
+ });
263
266
  const defaultStyles = {
264
267
  stepIndicatorSize: 30,
265
268
  currentStepIndicatorSize: 40,
@@ -325,6 +328,7 @@ export default class StepIndicator extends Component {
325
328
  // ),
326
329
  // }));
327
330
  // }
331
+
328
332
  if (prevProps.currentPosition !== this.props.currentPosition) {
329
333
  this.onCurrentPositionChanged(this.props.currentPosition);
330
334
  }
@@ -365,50 +369,6 @@ const styles = StyleSheet.create({
365
369
  justifyContent: "center"
366
370
  }
367
371
  });
368
- StepIndicator.defaultProps = {
369
- currentPosition: 0,
370
- stepCount: 5,
371
- customStyles: {},
372
- direction: "horizontal"
373
- };rrentPositionChanged(this.props.currentPosition);
374
- }
375
- }
376
- }
377
- const styles = StyleSheet.create({
378
- container: {
379
- backgroundColor: "transparent"
380
- },
381
- stepIndicatorContainer: {
382
- flexDirection: "row",
383
- alignItems: "center",
384
- justifyContent: "space-around",
385
- backgroundColor: "transparent"
386
- },
387
- stepLabelsContainer: {
388
- justifyContent: "space-around"
389
- },
390
- step: {
391
- alignItems: "center",
392
- justifyContent: "center",
393
- zIndex: 2
394
- },
395
- stepContainer: {
396
- flex: 1,
397
- flexDirection: "row",
398
- alignItems: "center",
399
- justifyContent: "center"
400
- },
401
- stepLabel: {
402
- fontSize: 12,
403
- textAlign: "center",
404
- fontWeight: "500"
405
- },
406
- stepLabelItem: {
407
- flex: 1,
408
- alignItems: "center",
409
- justifyContent: "center"
410
- }
411
- });
412
372
  StepIndicator.defaultProps = {
413
373
  currentPosition: 0,
414
374
  stepCount: 5,
@@ -5,6 +5,9 @@ export const SEED_DATA = {
5
5
  description: "Deck swiper container",
6
6
  category: COMPONENT_TYPES.swiper,
7
7
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
+ layout: {
9
+ width: "100%"
10
+ },
8
11
  triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
9
12
  props: {
10
13
  onIndexChanged: createActionProp({
@@ -5,5 +5,12 @@ export const SEED_DATA = {
5
5
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
6
6
  category: COMPONENT_TYPES.swiper,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ layout: {
9
+ flex: 1,
10
+ alignItems: "center",
11
+ justifyContent: "center",
12
+ padding: 20,
13
+ borderWidth: 2
14
+ },
8
15
  props: {}
9
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA4DlE,CAAC;AAiBF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA6DlE,CAAC;AAiBF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeckSwiperCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiperCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AAgCD,wBAAyC"}
1
+ {"version":3,"file":"DeckSwiperCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiperCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AA+BD,wBAAyC"}
@@ -4,6 +4,9 @@ export declare const SEED_DATA: {
4
4
  description: string;
5
5
  category: string;
6
6
  stylesPanelSections: string[];
7
+ layout: {
8
+ width: string;
9
+ };
7
10
  triggers: string[];
8
11
  props: {
9
12
  onIndexChanged: {
@@ -1 +1 @@
1
- {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiper.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CrB,CAAC"}
1
+ {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiper.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CrB,CAAC"}
@@ -4,6 +4,13 @@ export declare const SEED_DATA: {
4
4
  description: string;
5
5
  category: string;
6
6
  stylesPanelSections: string[];
7
+ layout: {
8
+ flex: number;
9
+ alignItems: string;
10
+ justifyContent: string;
11
+ padding: number;
12
+ borderWidth: number;
13
+ };
7
14
  props: {};
8
15
  };
9
16
  //# sourceMappingURL=DeckSwiperCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeckSwiperCard.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiperCard.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
1
+ {"version":3,"file":"DeckSwiperCard.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiperCard.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAcrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.7.9-28aa70.2+28aa703",
3
+ "version": "46.7.9-3ec6a6.2+3ec6a62",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.7.9-28aa70.2+28aa703",
44
+ "@draftbit/types": "^46.7.9-3ec6a6.2+3ec6a62",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -92,5 +92,5 @@
92
92
  ]
93
93
  ]
94
94
  },
95
- "gitHead": "28aa70352ea13ca8e0c808bd54f2aa682dae0082"
95
+ "gitHead": "3ec6a6211ad7068f7385664d90ec27cafe83cd2d"
96
96
  }
@@ -6,12 +6,13 @@ const DeckSwiper = ({ onIndexChanged, onEndReached, startCardIndex = 0, infinite
6
6
  // an array of indices based on children count
7
7
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
8
8
  /**
9
- * By default react-native-deck-swiper positions everything with absolute position
10
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
9
+ * By default react-native-deck-swiper positions everything with absolute position.
10
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
11
11
  *
12
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
13
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
14
- * This effectivley makes the default height of the container be the height of the first card
12
+ *
13
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
14
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
15
+ * This effectivley makes the default height of the container be the height of the first card.
15
16
  */
16
17
  return (React.createElement(View, null,
17
18
  React.createElement(View, { style: styles.containerHeightFiller }, childrenArray.length && childrenArray[0]),
@@ -36,12 +36,13 @@ const DeckSwiper: React.FC<React.PropsWithChildren<DeckSwiperProps>> = ({
36
36
  );
37
37
 
38
38
  /**
39
- * By default react-native-deck-swiper positions everything with absolute position
40
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
39
+ * By default react-native-deck-swiper positions everything with absolute position.
40
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
41
41
  *
42
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
43
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
44
- * This effectivley makes the default height of the container be the height of the first card
42
+ *
43
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
44
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
45
+ * This effectivley makes the default height of the container be the height of the first card.
45
46
  */
46
47
 
47
48
  return (
@@ -5,7 +5,6 @@ const DeckSwiperCard = ({ style, children, theme, }) => (React.createElement(Vie
5
5
  styles.card,
6
6
  {
7
7
  backgroundColor: theme.colors.background,
8
- borderRadius: theme.borderRadius.global,
9
8
  borderColor: theme.colors.divider,
10
9
  },
11
10
  style,
@@ -19,7 +19,6 @@ const DeckSwiperCard: React.FC<DeckSwiperCardProps> = ({
19
19
  styles.card,
20
20
  {
21
21
  backgroundColor: theme.colors.background,
22
- borderRadius: theme.borderRadius.global,
23
22
  borderColor: theme.colors.divider,
24
23
  },
25
24
  style,
@@ -5,6 +5,9 @@ export const SEED_DATA = {
5
5
  description: "Deck swiper container",
6
6
  category: COMPONENT_TYPES.swiper,
7
7
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
+ layout: {
9
+ width: "100%",
10
+ },
8
11
  triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
9
12
  props: {
10
13
  onIndexChanged: createActionProp({
@@ -13,6 +13,9 @@ export const SEED_DATA = {
13
13
  description: "Deck swiper container",
14
14
  category: COMPONENT_TYPES.swiper,
15
15
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
16
+ layout: {
17
+ width: "100%",
18
+ },
16
19
  triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
17
20
  props: {
18
21
  onIndexChanged: createActionProp({
@@ -5,5 +5,12 @@ export const SEED_DATA = {
5
5
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
6
6
  category: COMPONENT_TYPES.swiper,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ layout: {
9
+ flex: 1,
10
+ alignItems: "center",
11
+ justifyContent: "center",
12
+ padding: 20,
13
+ borderWidth: 2,
14
+ },
8
15
  props: {},
9
16
  };
@@ -9,5 +9,12 @@ export const SEED_DATA = {
9
9
  description: "Single Deck Swiper Card item to be used in DeckSwiper",
10
10
  category: COMPONENT_TYPES.swiper,
11
11
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
12
+ layout: {
13
+ flex: 1,
14
+ alignItems: "center",
15
+ justifyContent: "center",
16
+ padding: 20,
17
+ borderWidth: 2,
18
+ },
12
19
  props: {},
13
20
  };