Skip to content

Conversation

@ryami333
Copy link
Contributor

@ryami333 ryami333 commented Feb 27, 2018

Until now, any extra props you pass to any RAA elements get swallowed by the element. This PR adds the ability to propagate any additional props.

Eg.

return (
    <AccordionItemTitle role="foo" lang="en" title="bar">I'm a title!</AccordionItemTitle>
);

Note: backwards-compatible change to the API, so this will require a bump to the 'minor' version.

Closes #53.

Copy link
Contributor

@vincentaudebert vincentaudebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Excellent find! Thanks Mitch

type AccordionItemTitleProps = {
children: Node,
className: string,
type AccordionItemTitleProps = ElementProps<'div'> & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting one :)

@ryami333 ryami333 force-pushed the feature/respect-arbitrary-props branch from 13e1d4d to 8210a47 Compare February 27, 2018 21:04
@ryami333 ryami333 force-pushed the feature/respect-arbitrary-props branch from 8210a47 to 4ca313c Compare February 27, 2018 21:06
@vincentaudebert vincentaudebert merged commit 9edce6c into master Feb 27, 2018
@ryami333 ryami333 deleted the feature/respect-arbitrary-props branch February 27, 2018 21:23
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.

3 participants