Skip to content
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

feat(ui): tab-view component #243

Merged
merged 7 commits into from
Jan 28, 2019
Merged

feat(ui): tab-view component #243

merged 7 commits into from
Jan 28, 2019

Conversation

artyorsh
Copy link
Collaborator

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Implements following components:

  • tab
  • tab-bar
  • view-pager
  • tab-view

@artyorsh artyorsh added needs review 📱 Components components module-specific ➡️ Next Upcoming changes labels Jan 23, 2019
@artyorsh artyorsh changed the title feat(ui): tab-view feat(ui): tab-view component Jan 23, 2019
return elements.map(this.renderChild);
};

private getComponentStyle = (source: StyleType): StyleType => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move it above all render methods

Copy link
Collaborator Author

@artyorsh artyorsh Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we need to do this in each implemented component
probably we can refactor this in future

style={{ flex: 1 }}
key={index}
activeOpacity={1.0}
onPress={() => this.onChildPress(index)}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove lambda here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a need to handle which tab was pressed
Passing index directly to Tab component and wrapping it to Touchable inside it's own implementation could help, but I don't think tab should know it's index

@artyorsh artyorsh merged commit c981213 into next Jan 28, 2019
@artyorsh artyorsh deleted the feat/tab-view branch January 28, 2019 09:26
@artyorsh artyorsh self-assigned this Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➡️ Next Upcoming changes 📱 Components components module-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants