@ecohouse/ui 0.1.15 → 0.1.16

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/index.js CHANGED
@@ -1551,6 +1551,7 @@ var styles4 = StyleSheet.create({
1551
1551
  });
1552
1552
  var ICON_SIZE3 = 20;
1553
1553
  var ANIMATION_DURATION = 200;
1554
+ var OPTION_HORIZONTAL_PADDING = 16;
1554
1555
  var SegmentedToggle = forwardRef(
1555
1556
  function SegmentedToggle2({
1556
1557
  options,
@@ -1580,7 +1581,7 @@ var SegmentedToggle = forwardRef(
1580
1581
  const [containerWidth, setContainerWidth] = useState(0);
1581
1582
  const availableOptionWidth = Math.max(0, (containerWidth - 12) / 2);
1582
1583
  const widestContentWidth = Math.max(...contentWidths);
1583
- const contentBasedOptionWidth = widestContentWidth > 0 ? widestContentWidth + 24 * 2 : 0;
1584
+ const contentBasedOptionWidth = widestContentWidth > 0 ? widestContentWidth + OPTION_HORIZONTAL_PADDING * 2 : 0;
1584
1585
  const optionWidth = fullWidth ? availableOptionWidth : contentBasedOptionWidth;
1585
1586
  const indicatorTranslateX = progress.interpolate({
1586
1587
  inputRange: [0, 1],
@@ -1702,7 +1703,7 @@ var styles5 = StyleSheet.create({
1702
1703
  flexDirection: "row",
1703
1704
  alignItems: "center",
1704
1705
  justifyContent: "center",
1705
- paddingHorizontal: 24,
1706
+ paddingHorizontal: OPTION_HORIZONTAL_PADDING,
1706
1707
  borderRadius: 60
1707
1708
  },
1708
1709
  optionContent: {