@bitrise/bitkit 9.26.0 → 9.26.2-alpha-chakra.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "9.26.0",
4
+ "version": "9.26.2-alpha-chakra.2",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -5,7 +5,7 @@ import Icon, { TypeIconName } from '../Icon/Icon';
5
5
  import Text from '../Text/Text';
6
6
 
7
7
  export interface EmptyStateProps extends BoxProps {
8
- description?: string;
8
+ description?: React.ReactNode;
9
9
  iconName: TypeIconName;
10
10
  maxContentWidth?: string;
11
11
  title: string;
@@ -8,7 +8,7 @@ export interface SelectProps extends ChakraSelectProps {
8
8
  }
9
9
 
10
10
  const Select = (props: SelectProps) => {
11
- const { iconName = 'DropdownArrows', size, ...rest } = props;
11
+ const { iconName = 'DropdownArrows', size, placeholder, children, ...rest } = props;
12
12
  const iconSize = size === 'medium' ? '24' : '16';
13
13
  const properties: ChakraSelectProps = {
14
14
  icon: <Icon name={iconName} fontSize={iconSize} size={iconSize} />,
@@ -16,7 +16,16 @@ const Select = (props: SelectProps) => {
16
16
  variant: 'select',
17
17
  ...rest,
18
18
  };
19
- return <ChakraSelect {...properties} />;
19
+ return (
20
+ <ChakraSelect {...properties}>
21
+ {placeholder && (
22
+ <option selected hidden disabled value="">
23
+ {placeholder}
24
+ </option>
25
+ )}
26
+ {children}
27
+ </ChakraSelect>
28
+ );
20
29
  };
21
30
 
22
31
  Select.defaultProps = {
package/src/index.ts CHANGED
@@ -82,3 +82,6 @@ export type { MenuListProps } from './Components/Menu/MenuList';
82
82
  export { default as MenuList } from './Components/Menu/MenuList';
83
83
 
84
84
  export { default as useToast } from './Components/Toast/Toast';
85
+
86
+ export type { EmptyStateProps } from './Components/EmptyState/EmptyState';
87
+ export { default as EmptyState } from './Components/EmptyState/EmptyState';