@planningcenter/tapestry-react 1.2.0 → 1.3.0

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.
@@ -68,6 +68,7 @@ function Button(_ref) {
68
68
 
69
69
  var buttonProps = {
70
70
  alignment: 'center',
71
+ as: restProps.href || to ? 'a' : 'div',
71
72
  axis: 'horizontal',
72
73
  distribution: 'center',
73
74
  fontSize: fontSize,
@@ -79,7 +80,6 @@ function Button(_ref) {
79
80
  role: 'button',
80
81
  strokeAlign: 'inside',
81
82
  strokeWeight: 1,
82
- as: restProps.href || to ? 'a' : 'div',
83
83
  userSelect: 'none',
84
84
  zIndex: 1
85
85
  };
@@ -227,6 +227,11 @@ function Button(_ref) {
227
227
  zIndex: 2
228
228
  }, buttonProps.hover)
229
229
  });
230
+ } // pass to if as is defined
231
+
232
+
233
+ if (restProps.as) {
234
+ buttonProps.to = to;
230
235
  }
231
236
 
232
237
  if (process.env.NODE_ENV !== 'production') {
@@ -30,7 +30,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
30
30
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
31
31
 
32
32
  function ChurchCenterStatus(_ref) {
33
- var _ref$ccAppEnabled = _ref.ccAppEnabled,
33
+ var _ref$buttonProps = _ref.buttonProps,
34
+ passedButtonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
35
+ _ref$ccAppEnabled = _ref.ccAppEnabled,
34
36
  ccAppEnabled = _ref$ccAppEnabled === void 0 ? false : _ref$ccAppEnabled,
35
37
  _ref$ccPublishingEnab = _ref.ccPublishingEnabled,
36
38
  ccPublishingEnabled = _ref$ccPublishingEnab === void 0 ? false : _ref$ccPublishingEnab,
@@ -44,16 +46,23 @@ function ChurchCenterStatus(_ref) {
44
46
  dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
45
47
  icons = _ref.icons,
46
48
  productUrl = _ref.productUrl,
49
+ _ref$renderPopoverFoo = _ref.renderPopoverFooter,
50
+ renderPopoverFooter = _ref$renderPopoverFoo === void 0 ? function () {} : _ref$renderPopoverFoo,
47
51
  settingsUrl = _ref.settingsUrl,
48
- props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, ["ccAppEnabled", "ccPublishingEnabled", "ccWebEnabled", "description", "destinationLabel", "disabledDescription", "dropdownProps", "icons", "productUrl", "settingsUrl"]);
49
- var buttonProps = {
52
+ _ref$showSettingsLink = _ref.showSettingsLink,
53
+ showSettingsLink = _ref$showSettingsLink === void 0 ? true : _ref$showSettingsLink,
54
+ props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, ["buttonProps", "ccAppEnabled", "ccPublishingEnabled", "ccWebEnabled", "description", "destinationLabel", "disabledDescription", "dropdownProps", "icons", "productUrl", "renderPopoverFooter", "settingsUrl", "showSettingsLink"]);
55
+
56
+ var buttonProps = _objectSpread({
50
57
  distribution: 'start',
51
58
  fontWeight: 400,
52
59
  paddingHorizontal: 2,
53
60
  radius: 0,
54
61
  variant: 'naked'
55
- };
62
+ }, passedButtonProps);
63
+
56
64
  var ccEnabled = ccAppEnabled || ccWebEnabled;
65
+ var hasLinks = showSettingsLink || ccEnabled && ccPublishingEnabled || !!renderPopoverFooter();
57
66
 
58
67
  var icon = _objectSpread({
59
68
  check: 'checkmark',
@@ -113,19 +122,23 @@ function ChurchCenterStatus(_ref) {
113
122
  }), /*#__PURE__*/_react["default"].createElement(_Text["default"], {
114
123
  size: "14px",
115
124
  weight: 700
116
- }, "Mobile app")))), /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
125
+ }, "Mobile app")))), hasLinks && /*#__PURE__*/_react["default"].createElement(_Divider["default"], {
117
126
  margin: 0.5
118
- }), /*#__PURE__*/_react["default"].createElement(_StackView["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], (0, _extends2["default"])({
127
+ }), /*#__PURE__*/_react["default"].createElement(_StackView["default"], null, showSettingsLink && /*#__PURE__*/_react["default"].createElement(_Button["default"], (0, _extends2["default"])({
119
128
  external: true,
120
129
  title: "Update settings",
121
130
  to: settingsUrl
122
131
  }, buttonProps)), ccEnabled && ccPublishingEnabled && /*#__PURE__*/_react["default"].createElement(_Button["default"], (0, _extends2["default"])({
123
132
  external: true,
133
+ iconRight: {
134
+ color: 'primary',
135
+ name: icon.external,
136
+ marginLeft: 1,
137
+ size: 'xs'
138
+ },
139
+ title: "Visit " + destinationLabel,
124
140
  to: productUrl
125
- }, buttonProps), "Visit ", destinationLabel, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
126
- color: "primary",
127
- name: icon.external,
128
- marginLeft: 1,
129
- size: "sm"
130
- })))));
141
+ }, buttonProps, {
142
+ as: "a"
143
+ })), renderPopoverFooter(buttonProps))));
131
144
  }
@@ -17,8 +17,9 @@ function Heading(_ref) {
17
17
  var children = _ref.children,
18
18
  restProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, ["children"]);
19
19
  return /*#__PURE__*/_react["default"].createElement(_HeadingUppercase["default"], (0, _extends2["default"])({
20
- padding: 1,
21
- paddingBottom: 0.5
20
+ paddingBottom: 0.5,
21
+ paddingHorizontal: 2,
22
+ paddingTop: 1
22
23
  }, restProps), children);
23
24
  }
24
25
 
@@ -35,7 +35,7 @@ function Item(_ref) {
35
35
  minHeight: 4,
36
36
  fontSize: '14px',
37
37
  paddingVertical: 0.75,
38
- paddingHorizontal: 1,
38
+ paddingHorizontal: 2,
39
39
  whiteSpace: 'nowrap',
40
40
  position: 'relative',
41
41
  userSelect: 'none',
@@ -43,11 +43,11 @@ function Item(_ref) {
43
43
  };
44
44
 
45
45
  if (renderLeft) {
46
- css.paddingLeft = 4;
46
+ css.paddingLeft = 5;
47
47
  }
48
48
 
49
49
  if (renderRight) {
50
- css.paddingRight = 4;
50
+ css.paddingRight = 5;
51
51
  }
52
52
 
53
53
  if (isHighlighted) {
@@ -69,7 +69,7 @@ function Item(_ref) {
69
69
  height: "100%",
70
70
  position: "absolute",
71
71
  top: 0,
72
- left: "-1px"
72
+ left: 0.5
73
73
  }, typeof renderLeft === 'function' ? renderRight() : /*#__PURE__*/(0, _react.cloneElement)(renderLeft, {
74
74
  size: renderLeft.props && renderLeft.props.size || 'md'
75
75
  })), children, renderRight && /*#__PURE__*/_react["default"].createElement(_Box["default"], {
@@ -80,7 +80,7 @@ function Item(_ref) {
80
80
  height: "100%",
81
81
  position: "absolute",
82
82
  top: 0,
83
- right: "-1px"
83
+ right: 0.5
84
84
  }, typeof renderRight === 'function' ? renderRight() : /*#__PURE__*/(0, _react.cloneElement)(renderRight, {
85
85
  size: renderRight.props && renderRight.props.size || 'md'
86
86
  })));
@@ -61,6 +61,7 @@ export function Button(_ref) {
61
61
 
62
62
  var buttonProps = {
63
63
  alignment: 'center',
64
+ as: restProps.href || to ? 'a' : 'div',
64
65
  axis: 'horizontal',
65
66
  distribution: 'center',
66
67
  fontSize: fontSize,
@@ -72,7 +73,6 @@ export function Button(_ref) {
72
73
  role: 'button',
73
74
  strokeAlign: 'inside',
74
75
  strokeWeight: 1,
75
- as: restProps.href || to ? 'a' : 'div',
76
76
  userSelect: 'none',
77
77
  zIndex: 1
78
78
  };
@@ -220,6 +220,11 @@ export function Button(_ref) {
220
220
  zIndex: 2
221
221
  }, buttonProps.hover)
222
222
  });
223
+ } // pass to if as is defined
224
+
225
+
226
+ if (restProps.as) {
227
+ buttonProps.to = to;
223
228
  }
224
229
 
225
230
  if (process.env.NODE_ENV !== 'production') {
@@ -33,7 +33,9 @@ var _ref6 = /*#__PURE__*/React.createElement(Divider, {
33
33
  });
34
34
 
35
35
  export function ChurchCenterStatus(_ref) {
36
- var _ref$ccAppEnabled = _ref.ccAppEnabled,
36
+ var _ref$buttonProps = _ref.buttonProps,
37
+ passedButtonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
38
+ _ref$ccAppEnabled = _ref.ccAppEnabled,
37
39
  ccAppEnabled = _ref$ccAppEnabled === void 0 ? false : _ref$ccAppEnabled,
38
40
  _ref$ccPublishingEnab = _ref.ccPublishingEnabled,
39
41
  ccPublishingEnabled = _ref$ccPublishingEnab === void 0 ? false : _ref$ccPublishingEnab,
@@ -47,17 +49,23 @@ export function ChurchCenterStatus(_ref) {
47
49
  dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
48
50
  icons = _ref.icons,
49
51
  productUrl = _ref.productUrl,
52
+ _ref$renderPopoverFoo = _ref.renderPopoverFooter,
53
+ renderPopoverFooter = _ref$renderPopoverFoo === void 0 ? function () {} : _ref$renderPopoverFoo,
50
54
  settingsUrl = _ref.settingsUrl,
51
- props = _objectWithoutPropertiesLoose(_ref, ["ccAppEnabled", "ccPublishingEnabled", "ccWebEnabled", "description", "destinationLabel", "disabledDescription", "dropdownProps", "icons", "productUrl", "settingsUrl"]);
55
+ _ref$showSettingsLink = _ref.showSettingsLink,
56
+ showSettingsLink = _ref$showSettingsLink === void 0 ? true : _ref$showSettingsLink,
57
+ props = _objectWithoutPropertiesLoose(_ref, ["buttonProps", "ccAppEnabled", "ccPublishingEnabled", "ccWebEnabled", "description", "destinationLabel", "disabledDescription", "dropdownProps", "icons", "productUrl", "renderPopoverFooter", "settingsUrl", "showSettingsLink"]);
52
58
 
53
- var buttonProps = {
59
+ var buttonProps = _objectSpread({
54
60
  distribution: 'start',
55
61
  fontWeight: 400,
56
62
  paddingHorizontal: 2,
57
63
  radius: 0,
58
64
  variant: 'naked'
59
- };
65
+ }, passedButtonProps);
66
+
60
67
  var ccEnabled = ccAppEnabled || ccWebEnabled;
68
+ var hasLinks = showSettingsLink || ccEnabled && ccPublishingEnabled || !!renderPopoverFooter();
61
69
 
62
70
  var icon = _objectSpread({
63
71
  check: 'checkmark',
@@ -111,17 +119,21 @@ export function ChurchCenterStatus(_ref) {
111
119
  color: ccAppEnabled ? 'success' : 'error',
112
120
  name: ccAppEnabled ? icon.check : icon.x,
113
121
  size: "sm"
114
- }), _ref5))), _ref6, /*#__PURE__*/React.createElement(StackView, null, /*#__PURE__*/React.createElement(Button, _extends({
122
+ }), _ref5))), hasLinks && _ref6, /*#__PURE__*/React.createElement(StackView, null, showSettingsLink && /*#__PURE__*/React.createElement(Button, _extends({
115
123
  external: true,
116
124
  title: "Update settings",
117
125
  to: settingsUrl
118
126
  }, buttonProps)), ccEnabled && ccPublishingEnabled && /*#__PURE__*/React.createElement(Button, _extends({
119
127
  external: true,
128
+ iconRight: {
129
+ color: 'primary',
130
+ name: icon.external,
131
+ marginLeft: 1,
132
+ size: 'xs'
133
+ },
134
+ title: "Visit " + destinationLabel,
120
135
  to: productUrl
121
- }, buttonProps), "Visit ", destinationLabel, /*#__PURE__*/React.createElement(Icon, {
122
- color: "primary",
123
- name: icon.external,
124
- marginLeft: 1,
125
- size: "sm"
126
- })))));
136
+ }, buttonProps, {
137
+ as: "a"
138
+ })), renderPopoverFooter(buttonProps))));
127
139
  }
@@ -8,8 +8,9 @@ function Heading(_ref) {
8
8
  restProps = _objectWithoutPropertiesLoose(_ref, ["children"]);
9
9
 
10
10
  return /*#__PURE__*/React.createElement(HeadingUppercase, _extends({
11
- padding: 1,
12
- paddingBottom: 0.5
11
+ paddingBottom: 0.5,
12
+ paddingHorizontal: 2,
13
+ paddingTop: 1
13
14
  }, restProps), children);
14
15
  }
15
16
 
@@ -23,7 +23,7 @@ function Item(_ref) {
23
23
  minHeight: 4,
24
24
  fontSize: '14px',
25
25
  paddingVertical: 0.75,
26
- paddingHorizontal: 1,
26
+ paddingHorizontal: 2,
27
27
  whiteSpace: 'nowrap',
28
28
  position: 'relative',
29
29
  userSelect: 'none',
@@ -31,11 +31,11 @@ function Item(_ref) {
31
31
  };
32
32
 
33
33
  if (renderLeft) {
34
- css.paddingLeft = 4;
34
+ css.paddingLeft = 5;
35
35
  }
36
36
 
37
37
  if (renderRight) {
38
- css.paddingRight = 4;
38
+ css.paddingRight = 5;
39
39
  }
40
40
 
41
41
  if (isHighlighted) {
@@ -57,7 +57,7 @@ function Item(_ref) {
57
57
  height: "100%",
58
58
  position: "absolute",
59
59
  top: 0,
60
- left: "-1px"
60
+ left: 0.5
61
61
  }, typeof renderLeft === 'function' ? renderRight() : /*#__PURE__*/cloneElement(renderLeft, {
62
62
  size: renderLeft.props && renderLeft.props.size || 'md'
63
63
  })), children, renderRight && /*#__PURE__*/React.createElement(Box, {
@@ -68,7 +68,7 @@ function Item(_ref) {
68
68
  height: "100%",
69
69
  position: "absolute",
70
70
  top: 0,
71
- right: "-1px"
71
+ right: 0.5
72
72
  }, typeof renderRight === 'function' ? renderRight() : /*#__PURE__*/cloneElement(renderRight, {
73
73
  size: renderRight.props && renderRight.props.size || 'md'
74
74
  })));
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  declare type ChurchCenterStatusProps = {
3
+ /**
4
+ * Pass props to the Dropdown buttons.
5
+ */
6
+ buttonProps?: object;
3
7
  /**
4
8
  * Determines status of Church Center App.
5
9
  */
@@ -36,10 +40,20 @@ declare type ChurchCenterStatusProps = {
36
40
  * Where the browser should navigate when destination button is pressed.
37
41
  */
38
42
  productUrl: string;
43
+ /**
44
+ * Render nodes at the end of the popover. `buttonProps` is passed as an argument
45
+ * and can be spread on any `<Button />` component to match the style of the other
46
+ * popover links.
47
+ */
48
+ renderPopoverFooter: Function;
39
49
  /**
40
50
  * Where the browser should navigate when settings button is pressed.
41
51
  */
42
52
  settingsUrl: string;
53
+ /**
54
+ * Toggle the settings link display.
55
+ */
56
+ showSettingsLink?: boolean;
43
57
  };
44
- export declare function ChurchCenterStatus({ ccAppEnabled, ccPublishingEnabled, ccWebEnabled, description, destinationLabel, disabledDescription, dropdownProps, icons, productUrl, settingsUrl, ...props }: ChurchCenterStatusProps): JSX.Element;
58
+ export declare function ChurchCenterStatus({ buttonProps: passedButtonProps, ccAppEnabled, ccPublishingEnabled, ccWebEnabled, description, destinationLabel, disabledDescription, dropdownProps, icons, productUrl, renderPopoverFooter, settingsUrl, showSettingsLink, ...props }: ChurchCenterStatusProps): JSX.Element;
45
59
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry-react",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "A collection of flexible React components to help you build resilient, accessible user interfaces quickly and effectively.",
5
5
  "author": "Front End Systems Engineering <frontend@pco.bz>",
6
6
  "main": "dist/cjs/index.js",
@@ -116,6 +116,7 @@ export function Button({
116
116
 
117
117
  let buttonProps: any = {
118
118
  alignment: 'center',
119
+ as: (restProps as any).href || to ? 'a' : 'div',
119
120
  axis: 'horizontal',
120
121
  distribution: 'center',
121
122
  fontSize,
@@ -127,7 +128,6 @@ export function Button({
127
128
  role: 'button',
128
129
  strokeAlign: 'inside',
129
130
  strokeWeight: 1,
130
- as: (restProps as any).href || to ? 'a' : 'div',
131
131
  userSelect: 'none',
132
132
  zIndex: 1,
133
133
  }
@@ -271,6 +271,11 @@ export function Button({
271
271
  }
272
272
  }
273
273
 
274
+ // pass to if as is defined
275
+ if ((restProps as any).as) {
276
+ buttonProps.to = to
277
+ }
278
+
274
279
  if (process.env.NODE_ENV !== 'production') {
275
280
  if (icon && !(title || (tooltip && (tooltip as any).title))) {
276
281
  const { tooltipProps, wrapperProps } = useAccessibilityViolation(
@@ -59,6 +59,24 @@ render(
59
59
  )
60
60
  ```
61
61
 
62
+ ```jsx live
63
+ render(
64
+ <ChurchCenterStatus
65
+ ccAppEnabled
66
+ ccPublishingEnabled={false}
67
+ ccWebEnabled
68
+ description="On Church Center, people can browse and register for events."
69
+ destinationLabel="event list"
70
+ productUrl="#product"
71
+ renderPopoverFooter={(buttonProps) => (
72
+ <Button title="Another link!" {...buttonProps} />
73
+ )}
74
+ settingsUrl="#settings"
75
+ showSettingsLink={false}
76
+ />
77
+ )
78
+ ```
79
+
62
80
  ## Custom icons
63
81
 
64
82
  To use the Planning Center General set of icons, import the general set to your theme and define the overrides with the `icons` prop.
@@ -8,6 +8,11 @@ import StackView from '../StackView'
8
8
  import Text from '../Text'
9
9
 
10
10
  type ChurchCenterStatusProps = {
11
+ /**
12
+ * Pass props to the Dropdown buttons.
13
+ */
14
+ buttonProps?: object
15
+
11
16
  /**
12
17
  * Determines status of Church Center App.
13
18
  */
@@ -53,13 +58,26 @@ type ChurchCenterStatusProps = {
53
58
  */
54
59
  productUrl: string
55
60
 
61
+ /**
62
+ * Render nodes at the end of the popover. `buttonProps` is passed as an argument
63
+ * and can be spread on any `<Button />` component to match the style of the other
64
+ * popover links.
65
+ */
66
+ renderPopoverFooter: Function
67
+
56
68
  /**
57
69
  * Where the browser should navigate when settings button is pressed.
58
70
  */
59
71
  settingsUrl: string
72
+
73
+ /**
74
+ * Toggle the settings link display.
75
+ */
76
+ showSettingsLink?: boolean
60
77
  }
61
78
 
62
79
  export function ChurchCenterStatus({
80
+ buttonProps: passedButtonProps = {},
63
81
  ccAppEnabled = false,
64
82
  ccPublishingEnabled = false,
65
83
  ccWebEnabled = false,
@@ -69,7 +87,9 @@ export function ChurchCenterStatus({
69
87
  dropdownProps = {},
70
88
  icons,
71
89
  productUrl,
90
+ renderPopoverFooter = () => {},
72
91
  settingsUrl,
92
+ showSettingsLink = true,
73
93
  ...props
74
94
  }: ChurchCenterStatusProps) {
75
95
  const buttonProps: any = {
@@ -78,9 +98,14 @@ export function ChurchCenterStatus({
78
98
  paddingHorizontal: 2,
79
99
  radius: 0,
80
100
  variant: 'naked',
101
+ ...passedButtonProps,
81
102
  }
82
103
 
83
104
  const ccEnabled = ccAppEnabled || ccWebEnabled
105
+ const hasLinks =
106
+ showSettingsLink ||
107
+ (ccEnabled && ccPublishingEnabled) ||
108
+ !!renderPopoverFooter()
84
109
 
85
110
  const icon = {
86
111
  check: 'checkmark',
@@ -142,25 +167,32 @@ export function ChurchCenterStatus({
142
167
  </StackView>
143
168
  )}
144
169
  </StackView>
145
- <Divider margin={0.5} />
170
+ {hasLinks && <Divider margin={0.5} />}
146
171
  <StackView>
147
- <Button
148
- external
149
- title="Update settings"
150
- to={settingsUrl}
151
- {...buttonProps}
152
- />
172
+ {showSettingsLink && (
173
+ <Button
174
+ external
175
+ title="Update settings"
176
+ to={settingsUrl}
177
+ {...buttonProps}
178
+ />
179
+ )}
153
180
  {ccEnabled && ccPublishingEnabled && (
154
- <Button external to={productUrl} {...buttonProps}>
155
- Visit {destinationLabel}
156
- <Icon
157
- color="primary"
158
- name={icon.external}
159
- marginLeft={1}
160
- size="sm"
161
- />
162
- </Button>
181
+ <Button
182
+ external
183
+ iconRight={{
184
+ color: 'primary',
185
+ name: icon.external,
186
+ marginLeft: 1,
187
+ size: 'xs',
188
+ }}
189
+ title={`Visit ${destinationLabel}`}
190
+ to={productUrl}
191
+ {...buttonProps}
192
+ as="a"
193
+ />
163
194
  )}
195
+ {renderPopoverFooter(buttonProps)}
164
196
  </StackView>
165
197
  </Dropdown>
166
198
  </StackView>
@@ -4,7 +4,12 @@ import HeadingUppercase from '../HeadingUppercase'
4
4
 
5
5
  function Heading({ children, ...restProps }) {
6
6
  return (
7
- <HeadingUppercase padding={1} paddingBottom={0.5} {...restProps}>
7
+ <HeadingUppercase
8
+ paddingBottom={0.5}
9
+ paddingHorizontal={2}
10
+ paddingTop={1}
11
+ {...restProps}
12
+ >
8
13
  {children}
9
14
  </HeadingUppercase>
10
15
  )
package/src/Menu/Item.js CHANGED
@@ -20,7 +20,7 @@ function Item({
20
20
  minHeight: 4,
21
21
  fontSize: '14px',
22
22
  paddingVertical: 0.75,
23
- paddingHorizontal: 1,
23
+ paddingHorizontal: 2,
24
24
  whiteSpace: 'nowrap',
25
25
  position: 'relative',
26
26
  userSelect: 'none',
@@ -28,11 +28,11 @@ function Item({
28
28
  }
29
29
 
30
30
  if (renderLeft) {
31
- css.paddingLeft = 4
31
+ css.paddingLeft = 5
32
32
  }
33
33
 
34
34
  if (renderRight) {
35
- css.paddingRight = 4
35
+ css.paddingRight = 5
36
36
  }
37
37
 
38
38
  if (isHighlighted) {
@@ -62,7 +62,7 @@ function Item({
62
62
  height="100%"
63
63
  position="absolute"
64
64
  top={0}
65
- left="-1px"
65
+ left={0.5}
66
66
  >
67
67
  {typeof renderLeft === 'function'
68
68
  ? renderRight()
@@ -83,7 +83,7 @@ function Item({
83
83
  height="100%"
84
84
  position="absolute"
85
85
  top={0}
86
- right="-1px"
86
+ right={0.5}
87
87
  >
88
88
  {typeof renderRight === 'function'
89
89
  ? renderRight()