-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The current way of using the <TabSheet> component is a bit clunky, since you have to pair a <Tab> and the content component together with an id (using the tab -helper function together with a spread operator).
<TabSheet>
<Tabs slot="tabs">
<Tab id="dashboard-tab">Dashboard</Tab>
<Tab id="payment-tab"><i>Payment</i></Tab>
</Tabs>
<div {...tab('dashboard-tab')}>This is the Dashboard tab content</div>
<div {...tab('payment-tab')}>This is the Payment tab content</div>
</TabSheet>Improve the <TabSheet> API by introducing a helper component (<TabSheetTab>) which abstracts away the underlying id-based pairing, for example:
<TabSheet>
<TabSheetTab header="Dashboard">
<div>This is the Dashboard tab content</div>
</TabSheetTab>
<TabSheetTab header={<i>Payment</i>}>
<div>This is the Payment tab content</div>
</TabSheetTab>
</TabSheet>The outcome in both cases:
Prototype at https://github.com/vaadin/react-components/tree/feat/tabsheet-api
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
