Skip to content

Commit bfe649b

Browse files
committed
refactor: adjust generic type and examples
1 parent 0fa99b0 commit bfe649b

12 files changed

+18
-17
lines changed

example/src/Examples/SegmentedButtons/SegmentedButtonCustomColorCheck.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SegmentButtonCustomColorCheck = () => {
2020
return (
2121
<List.Section title={`Segmented Button - Custom Colors`}>
2222
<List.Subheader>Via Theme</List.Subheader>
23-
<SegmentedButtons<TransportMode>
23+
<SegmentedButtons
2424
value={themeValue}
2525
onValueChange={setThemeValue}
2626
theme={themeMock}

example/src/Examples/SegmentedButtons/SegmentedButtonDefault.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonDefault = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
value={value}
1515
onValueChange={setValue}
1616
buttons={[

example/src/Examples/SegmentedButtons/SegmentedButtonDisabled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonDisabled = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - disabled`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
onValueChange={setValue}
1515
buttons={[
1616
{

example/src/Examples/SegmentedButtons/SegmentedButtonMultiselect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonMultiselect = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - multiselect`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
multiSelect
1515
onValueChange={setValue}
1616
value={value}

example/src/Examples/SegmentedButtons/SegmentedButtonMultiselectIcons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonMultiselectIcons = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - multiselect only icons`}>
13-
<SegmentedButtons<Size>
13+
<SegmentedButtons
1414
multiSelect
1515
onValueChange={setValue}
1616
value={value}

example/src/Examples/SegmentedButtons/SegmentedButtonMultiselectRealCase.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ const SegmentedButtonMultiselectRealCase = () => {
1212

1313
const filteredData = React.useMemo(
1414
() =>
15-
value.includes(item.price.toString() as PriceRange)
16-
),
15+
restaurantsData.filter((item) =>
16+
value.includes(item.price.toString() as PriceRange)
17+
),
1718
[value]
1819
);
1920

2021
return (
2122
<View style={styles.container}>
22-
<SegmentedButtons<PriceRange>
23+
<SegmentedButtons
2324
value={value}
2425
onValueChange={setValue}
2526
multiSelect

example/src/Examples/SegmentedButtons/SegmentedButtonOnlyIcons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonOnlyIcons = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - only icons`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
onValueChange={setValue}
1515
style={styles.group}
1616
value={value}

example/src/Examples/SegmentedButtons/SegmentedButtonOnlyIconsWithCheck.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonOnlyIconsWithCheck = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - icons + show selected check`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
onValueChange={setValue}
1515
style={styles.group}
1616
value={value}

example/src/Examples/SegmentedButtons/SegmentedButtonRealCase.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const SegmentedButtonRealCase = () => {
1212

1313
return (
1414
<View style={styles.container}>
15-
<SegmentedButtons<MediaType>
15+
<SegmentedButtons
1616
value={value}
1717
onValueChange={setValue}
1818
buttons={[

example/src/Examples/SegmentedButtons/SegmentedButtonWithDensity.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SegmentedButtonWithDensity = () => {
1010

1111
return (
1212
<List.Section title={`Segmented Button - only labels + density`}>
13-
<SegmentedButtons<TransportMode>
13+
<SegmentedButtons
1414
onValueChange={setValue}
1515
value={value}
1616
density="medium"

0 commit comments

Comments
 (0)