@codeleap/web 3.23.1 → 3.23.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
|
@@ -34,6 +34,11 @@ const ItemOption = (props: OptionProps) => {
|
|
|
34
34
|
}
|
|
35
35
|
}, [item?.options, option, selectedItems, item?.id, canSelectMultiple])
|
|
36
36
|
|
|
37
|
+
const buttonProps = {
|
|
38
|
+
...item?.itemProps,
|
|
39
|
+
...option?.itemProps,
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
return (
|
|
38
43
|
<Button
|
|
39
44
|
debugName='Item option'
|
|
@@ -41,6 +46,7 @@ const ItemOption = (props: OptionProps) => {
|
|
|
41
46
|
onPress={onPress}
|
|
42
47
|
selected={isItemSelected}
|
|
43
48
|
styles={styles}
|
|
49
|
+
{...buttonProps}
|
|
44
50
|
/>
|
|
45
51
|
)
|
|
46
52
|
}
|
|
@@ -211,7 +217,7 @@ export const SectionFilters = (props: SectionFiltersProps) => {
|
|
|
211
217
|
props?.onApplyItems?.(_selectedItems as ItemProps[])
|
|
212
218
|
}
|
|
213
219
|
|
|
214
|
-
const Footer = renderFooterComponent || DefaultFooter
|
|
220
|
+
const Footer = renderFooterComponent || DefaultFooter
|
|
215
221
|
|
|
216
222
|
return (
|
|
217
223
|
<View style={variantStyles.wrapper}>
|
|
@@ -219,7 +225,7 @@ export const SectionFilters = (props: SectionFiltersProps) => {
|
|
|
219
225
|
{isEmpty ? null : data.map((item) => renderItem(item))}
|
|
220
226
|
</View>
|
|
221
227
|
|
|
222
|
-
<Footer
|
|
228
|
+
<Footer
|
|
223
229
|
onApply={onApplyItems}
|
|
224
230
|
onClear={onClearItems}
|
|
225
231
|
shouldDisableActions={shouldDisableActions}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Button, ButtonComposition } from '../Button'
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariants, PropsOf, StylesOf } from '@codeleap/common'
|
|
3
3
|
import { SectionFiltersComposition, SectionFilterPresets } from './styles'
|
|
4
4
|
|
|
5
5
|
export type ItemOptionProps = {
|
|
6
6
|
label?: string
|
|
7
7
|
value: string | number
|
|
8
|
+
itemProps?: Omit<PropsOf<typeof Button>, 'debugName'>
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export type OnPressOptionProps = {
|
|
@@ -21,7 +22,7 @@ export type ItemProps = {
|
|
|
21
22
|
descriptionLabel?: string
|
|
22
23
|
showDescriptionLabel?: boolean
|
|
23
24
|
options?: ItemOptionProps[]
|
|
24
|
-
|
|
25
|
+
itemProps?: Omit<PropsOf<typeof Button>, 'debugName'>
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export type onSelectItemProps = {
|