import React , { useRef } from 'react' ; import { IDashboardReference , useDimensions } from '@kobsio/plugin-core' ; import Dashboards from './Dashboards' ; interface IDashboardsWrapperProps { cluster : string ; namespace : string ; references : IDashboardReference [ ] ; setDetails ? : ( details : React . ReactNode ) => void ; } export const DashboardsWrapper = ( { cluster , namespace , references , setDetails , } ) => { const refTabs = useRef < HTMLDivElement > ( null ) ; const tabsSize = useDimensions ( refTabs ) ; return ( < div className = "kobsio-dashboards-tabs-fill" ref = { refTabs } > < Dashboards cluster = { cluster } namespace = { namespace } references = { references } setDetails = { setDetails } forceDefaultSpan = { tabsSize . width < 1200 } / > < /div>); } ;