Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/tabpanel #171

Merged
merged 16 commits into from
Jun 10, 2021
Merged

Feature/tabpanel #171

merged 16 commits into from
Jun 10, 2021

Conversation

Ibabalola
Copy link
Contributor

@Ibabalola Ibabalola commented May 15, 2021

Tab panel is a generic component that should contain 2 sub-components:

  1. TabGroup
  2. Tab

The simple usage for this component should be:

<TabGroup activeTabClassName="tab-list-active">
 <Tab label="Tab 1">This is content for tab 1</Tab>
 <Tab label="Tab 2">This is content for tab 2</Tab>
 <Tab label="Tab 3">This is content for tab 3</Tab>
 <Tab label="Tab 4">This is content for tab 4</Tab>
</TabGroup>

Behaviour:

  • it should highlight the selected tab
  • it should give the ability to disable one tab
  • it should allow to specify a class for the tabgroup
  • it should allow to specify a class for the tab
  • it should allow to specify which one is the first tab selected
  • it should allow to specify a custom content instead of label( hello )

Appearance:

Screenshot 2021-05-15 at 09 58 10

@Ibabalola Ibabalola added the new component new component label May 15, 2021
@Ibabalola Ibabalola added this to the 0.2 milestone May 15, 2021
@Ibabalola Ibabalola self-assigned this May 15, 2021
@Ibabalola Ibabalola linked an issue May 15, 2021 that may be closed by this pull request
6 tasks
@Ibabalola
Copy link
Contributor Author

Ibabalola commented May 15, 2021

fair play @daniele-zurico i'll take a second look and will update the PR

@Ibabalola
Copy link
Contributor Author

Ibabalola commented May 16, 2021

The simple usage has been updated to be:

    <TabGroup
      activeTabClassName="tab-list-active"
    >
      <Tab label="Tab 1">This is content for tab 1</Tab>
      <Tab label="Tab 2">This is content for tab 2</Tab>
      <Tab label="Tab 3">This is content for tab 3</Tab>
      <Tab label="Tab 4">This is content for tab 4</Tab>
    </TabGroup>

@Ibabalola Ibabalola removed their assignment May 19, 2021
@daniele-zurico daniele-zurico changed the base branch from main to release/0.2 May 28, 2021 15:38
@daniele-zurico
Copy link
Contributor

Tab panel is a generic component that should contain 2 sub-components:

  1. TabGroup
  2. Tab

The simple usage for this component should be:

<TabGroup activeTabClassName="tab-list-active">
 <Tab label="Tab 1">This is content for tab 1</Tab>
 <Tab label="Tab 2">This is content for tab 2</Tab>
 <Tab label="Tab 3">This is content for tab 3</Tab>
 <Tab label="Tab 4">This is content for tab 4</Tab>
</TabGroup>

Behaviour:

  • it should highlight the selected tab
  • it should give the ability to disable one tab
  • it should allow to specify a class for the tabgroup
  • it should allow to specify a class for the tab
  • it should allow to specify which one is the first tab selected
  • it should allow to specify a custom content instead of label( hello )

Appearance:

Screenshot 2021-05-15 at 09 58 10

Hey @Ibabalola let's go with this implementation ... the only addition is the following one:

<TabGroup>
 <Tab label="Tab 1" customLabel={}>This is content for tab 1</Tab>
 <Tab label="Tab 2" customLabel={}>This is content for tab 2</Tab>
 <Tab label="Tab 3" customLabel={}>This is content for tab 3</Tab>
 <Tab label="Tab 4" customLabel={}>This is content for tab 4</Tab>
</TabGroup>

CustomLabel will allow to specify a custom header like

@Ibabalola
Copy link
Contributor Author

Ibabalola commented Jun 10, 2021

@daniele-zurico added the ability for custom labels within <Tab>

Screenshot 2021-06-10 at 10 41 09

<TabGroup>
 <Tab eventKey="tab-1" label="tab 1">This the content for tab 1</Tab>
 <Tab eventKey="tab-2" label="tab 2">This the content for tab 2</Tab>
 <Tab 
    eventKey="tab-3" 
    label={<img src="https://freesvg.org/img/afaulconbridge-Lightbulb-OnOff-1.png" width="20px"/>}>This is content for tab 3</Tab>
</TabGroup>

@Ibabalola Ibabalola merged commit b072266 into release/0.2 Jun 10, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
new component new component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TabPanel
3 participants