| 1 |
/** |
| 2 |
* WordPress dependencies |
| 3 |
*/ |
| 4 |
import React from "react"; |
| 5 |
import { TabPanel } from "@wordpress/components"; |
| 6 |
|
| 7 |
/** |
| 8 |
* Internal dependencies |
| 9 |
*/ |
| 10 |
import { TabsPanelControlProps } from "./types"; |
| 11 |
|
| 12 |
/** |
| 13 |
* Tabs panel control component |
| 14 |
* Simple wrapper around WordPress TabPanel component |
| 15 |
*/ |
| 16 |
const TabsPanelControl: React.FC<TabsPanelControlProps> = ({ tabs }) => { |
| 17 |
return ( |
| 18 |
<TabPanel className="sliderberg-tab-panels" tabs={tabs}> |
| 19 |
{(tab) => tab.component} |
| 20 |
</TabPanel> |
| 21 |
); |
| 22 |
}; |
| 23 |
|
| 24 |
export default TabsPanelControl; |
| 25 |
|