Closed JackHowa closed 4 years ago
Looks like a neat feature to have. We'd have to find some way to measure the text content, and then based on that decide how much it needs to move by. I'd gladly support a PR for this
@iRoachie about the assets, do you have any advice for it? Maybe vector icons, or a source object passed by props, or something else?
@araujobarret Not sure what you are referring to. Do you mean changing the icons?
@iRoachie , sorry I wasn't too clear :grimacing:
indicator restricted to content
and icons next to labels
have images or icons on it, so to enable these features we should allow to give the specific asset or an vector icon to be shown on each tab item.
The lib from https://github.com/oblador/react-native-vector-icons has a ton of icons that we could use too.
We could pass the <Icon />
or the source prop of the <Image />
component as props <MaterialTabs />
, however to use the <Icon />
component we would need to import react-native-vector-icons.
Is just a thought before starting working on, btw idk if this is too clear to get my idea :laughing:
You can use any icons you want for the labels. We released this in v3.8.0. See https://github.com/iRoachie/react-native-material-tabs/pull/35#issue-209710002 for usage
Sorry I missed this part on readme.md
I will do an effort to work on it this week, create the tests for it and submit a PR with this feature :grimacing:
Looks like this working on an unrelated issue now
Hi, this looks exactly what I've been looking for! Curious about the
indicator restricted to content
. Is this supported? I haven't seen a prop for this.If not, do you have any recommendations for mimicking that behavior with your library?
target behavior/look: