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

Backend rendering support for tabs component #7

Open
omegascorp opened this issue Apr 30, 2017 · 0 comments
Open

Backend rendering support for tabs component #7

omegascorp opened this issue Apr 30, 2017 · 0 comments
Labels

Comments

@omegascorp
Copy link
Member

omegascorp commented Apr 30, 2017

Add data-name attribute to each tab
Hide all divs with data-tab attribute
Add data-selected attribute to element for which data-tab is equivalent of data-name attribute of current tab
Separate group of tabs via data-group attribute

Example of usage:

<div data-group>
  <Tabs
    options={[{
      title: 'Tab 1'
      name: 'tab1'
    }, {
      title: 'Tab 2'
      name: 'tab2'
    }]}
    value='tab1'
  />
  <div data-tab="tab1">tab1</div>
  <div data-tab="tab2">tab2</div>
</div>
@omegascorp omegascorp changed the title Backend support for tabs component Backend rendering support for tabs component Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant