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

[BottomNavigation] Add component prop #13960

Merged
merged 2 commits into from
Dec 20, 2018

Conversation

lychyi
Copy link
Contributor

@lychyi lychyi commented Dec 20, 2018

closes #13953

This allows BottomNavigation to use anything as its root node. In the use case described in #13953, we can now use the Paper component to add elevation.

// Render a BottomNavigation with some elevation by replacing the root div with Paper
class ElevatedBottomNavigation extends React.Component {
  paperComponent = props => <Paper elevation={this.props.elevation} {...props} />
  render() {
    return <BottomNavigation component={this.paperComponent} elevation={5} />
  }
}

@oliviertassinari oliviertassinari added new feature New feature or request component: bottom navigation This is the name of the generic UI component, not the React module! labels Dec 20, 2018
@oliviertassinari oliviertassinari changed the title [BottomNavigation] add component prop [BottomNavigation] Add component prop Dec 20, 2018
@oliviertassinari oliviertassinari merged commit 458feaa into mui:master Dec 20, 2018
@oliviertassinari
Copy link
Member

@lychyi It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: bottom navigation This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants