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

feat(Tabs): Created Tabs component #93

Merged
merged 1 commit into from
Feb 18, 2019
Merged

Conversation

suevalov
Copy link
Contributor

@suevalov suevalov commented Feb 14, 2019

Purpose of PR

This PR introduces new set of components: Tabs, Tab and TabPanel.

Tabs and TabPanel have no styles and used only for logical composition and hiding all required ARIA-attributes.

tabs

PR Checklist

  • I have read the relevant readme.md file(s)
  • All commits follow our Git commit message convention
  • Tests are added/updated/not required
  • Tests are passing
  • Storybook stories are added/updated/not required
  • Usage notes are added/updated/not required
  • Has been tested based on Contentful's browser support
  • Doesn't contain any sensitive information

Copy link
Contributor

@wichniowski wichniowski left a comment

Choose a reason for hiding this comment

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

Just some small notes regarding the active color otherwise look 🆒

}
return <a {...elementProps}>{children}</a>;
} else {
elementProps['aria-selected'] = selected;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is clever :)

extends React.DetailedHTMLProps<
React.HTMLAttributes<HTMLDivElement>,
HTMLDivElement
> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this? Just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because API allows using (with ...rest) all HTML properties that you would normally use with <div />

@suevalov suevalov merged commit 29fcc6e into master Feb 18, 2019
@suevalov suevalov deleted the create-tab-component branch February 18, 2019 16:38
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.

None yet

3 participants