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

breaking(BreadcrumbSection): change text prop to content #755

Merged
merged 3 commits into from
Oct 28, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Oct 27, 2016

Breaking Changes

Breadcrumb.Section prop text => content

<Breadcrumb /> allows defining children via the sections shorthand prop. The sections value is an array of objects where each item in the array is a Breadcrumb.Section props object.

The Breadcrumb.Section currently accepts primary content via the text prop. The standardized prop name for passing primary content is content. This PR changes the text prop to content to maintain standards.

You should update your code as follows:

-<Breadcrumb.Section text='Home' />
+<Breadcrumb.Section content='Home' />
const sections = [
- { text: 'Home', link: true },
+ { content: 'Home', link: true },
]

<Breadcrumb sections={sections} />

Features

The sections prop previously only accepted a Breadcrumb.Section props object. It now accepts any shorthand value: string, number, props object, or an element.

<Breadcrumb sections={['Home', 'Store', 'T-Shirt']} />
const sections = [
  <Breadcrumb.Section content='Home' link />,
  <Breadcrumb.Section content='Store' link />,
  <Breadcrumb.Section content='T-Shirt' active />,
]

<Breadcrumb sections={sections} />

@codecov-io
Copy link

codecov-io commented Oct 27, 2016

Current coverage is 99.48% (diff: 100%)

Merging #755 into master will increase coverage by <.01%

@@             master       #755   diff @@
==========================================
  Files           134        134          
  Lines          2147       2152     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2136       2141     +5   
  Misses           11         11          
  Partials          0          0          

Powered by Codecov. Last update 43ddb71...4f5ec5d

@levithomason levithomason changed the title breaking(Breadcrumb): change text prop to content breaking(BreadcrumbSection): change text prop to content Oct 28, 2016
@levithomason levithomason merged commit 5c9b05f into master Oct 28, 2016
@levithomason levithomason deleted the feat/breadcrumb-factory branch October 28, 2016 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants