-
Notifications
You must be signed in to change notification settings - Fork 734
ChipScreen - adding example for dynamic label #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2fb9c98
ChipScreen - adding example for onPress to open Dialog and dynamic la…
Inbal-Tish ad322ba
example title
Inbal-Tish 7b09ae1
counter as badge example name
Inbal-Tish ed13a4b
moving default values out of static
Inbal-Tish 15a166b
Chip - adding 'useCounter' boolean
Inbal-Tish 4dc39bc
WheelPicker - type fix
Inbal-Tish 14a97f7
Merge branch 'master' into feat/ChipScreen_exmples
ethanshar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,49 @@ | ||
/// <reference types="react" /> | ||
import {TextStyle} from 'react-native'; | ||
import {ItemProps} from './Item'; | ||
import React from 'react'; | ||
import { TextStyle, ViewStyle } from 'react-native'; | ||
import { ItemProps } from './Item'; | ||
export interface WheelPickerProps { | ||
/** | ||
* Data source for WheelPicker | ||
*/ | ||
items?: ItemProps[]; | ||
/** | ||
* Describe the height of each item in the WheelPicker | ||
* default value: 44 | ||
*/ | ||
itemHeight?: number; | ||
/** | ||
* Describe the number of rows visible | ||
* default value: 5 | ||
*/ | ||
numberOfVisibleRows?: number; | ||
/** | ||
* Text color for the focused row | ||
*/ | ||
activeTextColor?: string; | ||
/** | ||
* Text color for other, non-focused rows | ||
*/ | ||
inactiveTextColor?: string; | ||
/** | ||
* Row text style | ||
*/ | ||
textStyle?: TextStyle; | ||
/** | ||
* Event, on active row change | ||
*/ | ||
onChange?: (item: string | undefined, index: number) => void; | ||
/** | ||
* Container's ViewStyle, height is computed according to itemHeight * numberOfVisibleRows | ||
*/ | ||
style?: Omit<ViewStyle, 'height'>; | ||
/** | ||
* Support passing items as children props | ||
*/ | ||
children?: JSX.Element | JSX.Element[]; | ||
/** | ||
* WheelPicker initial value, can be ItemProps.value, number as index | ||
*/ | ||
selectedValue?: ItemProps | string | number; | ||
/** | ||
* Data source for WheelPicker | ||
*/ | ||
items?: ItemProps[]; | ||
/** | ||
* Describe the height of each item in the WheelPicker | ||
* default value: 44 | ||
*/ | ||
itemHeight?: number; | ||
/** | ||
* Describe the number of rows visible | ||
* default value: 5 | ||
*/ | ||
numberOfVisibleRows?: number; | ||
/** | ||
* Text color for the focused row | ||
*/ | ||
activeTextColor?: string; | ||
/** | ||
* Text color for other, non-focused rows | ||
*/ | ||
inactiveTextColor?: string; | ||
/** | ||
* Row text style | ||
*/ | ||
textStyle?: TextStyle; | ||
/** | ||
* Event, on active row change | ||
*/ | ||
onChange?: (item: string | number, index: number) => void; | ||
/** | ||
* Container's ViewStyle, height is computed according to itemHeight * numberOfVisibleRows | ||
*/ | ||
style?: Omit<ViewStyle, 'height'>; | ||
/** | ||
* Support passing items as children props | ||
*/ | ||
children?: JSX.Element | JSX.Element[]; | ||
/** | ||
* WheelPicker initial value, can be ItemProps.value, number as index | ||
*/ | ||
selectedValue: ItemProps | number | string; | ||
} | ||
declare const WheelPicker: ({ | ||
items, | ||
itemHeight, | ||
activeTextColor, | ||
inactiveTextColor, | ||
textStyle, | ||
onChange: onChangeEvent | ||
}: WheelPickerProps) => JSX.Element; | ||
declare const WheelPicker: React.MemoExoticComponent<({ items: propItems, itemHeight, numberOfVisibleRows, activeTextColor, inactiveTextColor, textStyle, onChange, style, children, selectedValue }: WheelPickerProps) => JSX.Element>; | ||
export default WheelPicker; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add a picker to the chip example screen?
Don't you think it's making the example screen a bit more complicated than needed?
What do you want to demonstrate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a request by ux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh ok :/