-
Notifications
You must be signed in to change notification settings - Fork 4
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
Design changes for search box and searchInput #28
Design changes for search box and searchInput #28
Conversation
src/components/SearchBox.tsx
Outdated
@@ -89,19 +101,31 @@ export default class extends React.PureComponent< | |||
); | |||
}; | |||
|
|||
renderNoResultState = query => { | |||
const { noResultsElement = noop, zerothState = noop } = this.props; | |||
return !query ? zerothState() : noResultsElement(query); |
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.
defaultState
<View> | ||
<View style={styles.textWrapper}> | ||
<TouchableWithoutFeedback onPress={onClose}> | ||
<Icon |
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.
wrap this in a View
src/components/SearchBox.tsx
Outdated
@@ -122,7 +146,7 @@ export default class extends React.PureComponent< | |||
} | |||
> | |||
<View style={styles.clearIcon}> | |||
<Icon name="close" color={colors.violet.base} size={20} /> | |||
<Icon name="close" color={colors.gray.darker} size={8} bold /> |
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.
no prop as bold
src/components/typings/SearchBox.ts
Outdated
@@ -10,6 +10,8 @@ export interface SearchBoxProps { | |||
onSelect: (item: any) => void; | |||
rowLabelExtractor?: (item: any) => string | number; | |||
noResultsElement: (queryValue: string) => JSX.Element; | |||
onClose?: () => void; | |||
zerothState: () => JSX.Element; |
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.
optional
No description provided.