Douro-ui / design-system

Douro UI is a Design System for all Metyis projects and partners
MIT License
2 stars 0 forks source link

Expected to have children in each tab #101

Open joaoprcosta opened 2 months ago

joaoprcosta commented 2 months ago

Describe the bug It is expected to have a children on each tab to pass components, so when we click on the label, it shows the respective content value for each tab.

To Reproduce Steps to reproduce the behavior: If you check the screenshot, no value is rendered above the tab.

<TabsGroup
          options={[
            { label: 'Tab 1', value: 'tab1' },
            { label: 'Tab 2', value: 'tab2' },
            { label: 'Tab 3', value: 'tab3', disabled: true },
          ]}
          selectedValue={selected}
          onChange={handleChange}
        />

Expected behavior We must have a ReactNode to pass React components to each Tab.

<TabsGroup
          options={[
            { label: 'Tab 1', value: <Component /> },
            { label: 'Tab 2', value: <Component /> },
            { label: 'Tab 3', value: <Component />,  disabled: true },
          ]}
          selectedValue={selected}
          onChange={handleChange}
        />

Screenshots

Screenshot 2024-08-30 at 16 29 01

Examples https://reactcommunity.org/react-tabs/