@bitrise/bitkit 13.132.0 → 13.133.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.132.0",
4
+ "version": "13.133.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { forwardRef, useDisclosure, useMultiStyleConfig } from '@chakra-ui/react';
3
- import Box from '../Box/Box';
3
+ import Box, { BoxProps } from '../Box/Box';
4
4
  import Collapse from '../Collapse/Collapse';
5
5
  import Card, { CardProps } from '../Card/Card';
6
6
  import Icon from '../Icon/Icon';
@@ -30,11 +30,12 @@ export interface ExpandableCardProps
30
30
  | 'onChange'
31
31
  > {
32
32
  buttonContent: ReactNode;
33
+ buttonPadding?: BoxProps['padding'];
33
34
  isExpanded?: boolean;
34
35
  onChange?: (isOpened: boolean) => void;
35
36
  }
36
37
  const ExpandableCard = forwardRef<ExpandableCardProps, 'div'>((props, ref) => {
37
- const { buttonContent, children, isExpanded, padding = '16', onChange, ...rest } = props;
38
+ const { buttonContent, children, isExpanded, padding = '16', buttonPadding = '16', onChange, ...rest } = props;
38
39
 
39
40
  const { isOpen, onToggle } = useDisclosure({ defaultIsOpen: isExpanded });
40
41
 
@@ -49,7 +50,7 @@ const ExpandableCard = forwardRef<ExpandableCardProps, 'div'>((props, ref) => {
49
50
 
50
51
  return (
51
52
  <Card sx={style.box} variant="outline" {...rest} ref={ref}>
52
- <Box __css={style.button} as="button" onClick={onButtonClick} padding={padding} role="group" type="button">
53
+ <Box __css={style.button} as="button" onClick={onButtonClick} padding={buttonPadding} role="group" type="button">
53
54
  {buttonContent}
54
55
  <Icon __css={style.chevron} name="ChevronDown" />
55
56
  </Box>