Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Make NavigationBar.Title more extendable #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dantman
Copy link

@dantman dantman commented Feb 24, 2017

  • Split NavigationBar.Title’s container and text up into separate components
    • Container handles platform padding, alignment, etc…
    • Text handles platform title text styles
    • Using the components directly applications are free to insert things before/after, wrap the text in a touch handler, replace the text with a non-text element, use multiple title text elements, or do any other type of title bar customization.
  • Used justifyContent on title instead of flex+textAlign on titleText for centering. This makes the container responsible for alignment and works in more situations than textAlign (non-text, multiple components, etc… all work). And also rids the text component from non-text related layout styles and frees it to be used multiple times or in other placements.

- Split NavigationBar.Title’s container and text up into separate components
  - Container handles platform padding, alignment, etc…
  - Text handles platform title text styles
  - Using the components directly applications are free to insert things before/after, wrap the text in a touch handler, replace the text with a non-text element, use multiple title text elements, or do any other type of title bar customization.
- Used `justifyContent` on `title` instead of `flex`+`textAlign` on `titleText` for centering. This makes the container responsible for alignment and works in more situations than `textAlign` (non-text, multiple components, etc… all work). And also rids the text component from non-text related layout styles and frees it to be used multiple times or in other placements.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant