@bitrise/bitkit 12.120.0 → 12.122.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": "12.120.0",
4
+ "version": "12.122.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -6,7 +6,7 @@ import Text from '../Text/Text';
6
6
 
7
7
  export interface EmptyStateProps extends BoxProps {
8
8
  description?: ReactNode;
9
- iconName: TypeIconName;
9
+ iconName?: TypeIconName;
10
10
  maxContentWidth?: string;
11
11
  title: string;
12
12
  }
@@ -16,7 +16,7 @@ const EmptyState = ({ children, description, iconName, maxContentWidth, title, .
16
16
 
17
17
  return (
18
18
  <Box __css={css.box} {...rest}>
19
- <Icon aria-label={title} name={iconName} size="32" />
19
+ {iconName && <Icon aria-label={title} name={iconName} size="32" />}
20
20
  <Text as="h5" sx={css.title}>
21
21
  {title}
22
22
  </Text>
@@ -27,12 +27,23 @@ export interface FilterProps extends Omit<BoxProps, 'onChange'> {
27
27
  isLoading?: boolean;
28
28
  onChange: (state: FilterState) => void;
29
29
  showAdd?: boolean;
30
+ showFilterIcon?: boolean;
30
31
  showSearch?: boolean;
31
32
  state: FilterState;
32
33
  }
33
34
 
34
35
  const Filter = (props: FilterProps) => {
35
- const { data, filtersDependOn, isLoading, onChange, showAdd = true, showSearch, state, ...rest } = props;
36
+ const {
37
+ data,
38
+ filtersDependOn,
39
+ isLoading,
40
+ onChange,
41
+ showAdd = true,
42
+ showFilterIcon = true,
43
+ showSearch,
44
+ state,
45
+ ...rest
46
+ } = props;
36
47
 
37
48
  const isInited = useRef<boolean>(false);
38
49
 
@@ -133,7 +144,7 @@ const Filter = (props: FilterProps) => {
133
144
  {isPopoverOpen && <ModalOverlay />}
134
145
  </Modal>
135
146
  <Box sx={filterStyle.content}>
136
- <Icon name="Filter" sx={filterStyle.icon} />
147
+ {showFilterIcon && <Icon name="Filter" sx={filterStyle.icon} />}
137
148
 
138
149
  {Object.keys(filters.switch).map((category) => (
139
150
  <FilterSwitchAdapter key={category} category={category} />