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

Header: add subheader shorthand #461

Closed
levithomason opened this issue Sep 2, 2016 · 0 comments · Fixed by #476
Closed

Header: add subheader shorthand #461

levithomason opened this issue Sep 2, 2016 · 0 comments · Fixed by #476

Comments

@levithomason
Copy link
Member

levithomason commented Sep 2, 2016

This is the current markup for Headers with subheader children:

<Header as='h2'>
  Sale!
  <Header.Subheader>
    $10.99
  </Header.Subheader>
</Header>

In keeping with other component shorthand, we ought to allow the Subheader to be configured via props:

<Header as='h2' content='Sale!' subheader='$10.99' />

As with all shorthand props, we should disallow() children when using the subheader shorthand. There are already docs, examples, and tests for Header icon and image shorthand that can be referenced.

@levithomason levithomason changed the title Header: add sub header shorthand Header: add subheader shorthand Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant