@@ -26,11 +26,11 @@ const StyledCloseButton = styled(MiradorMenuButton, { name: 'CompanionWindow', s
2626/**
2727 * CompanionWindow
2828 */
29- export function CompanionWindow ( props ) { // eslint-disable-line react/require-default-props
29+ export const CompanionWindow = forwardRef ( ( props , innerRef ) => { // eslint-disable-line react/require-default-props
3030 const {
3131 ariaLabel = undefined , classes = { } , direction, paperClassName = '' , onCloseClick = ( ) => { } , updateCompanionWindow = undefined , isDisplayed = false ,
3232 position = null , title = null , children = undefined , titleControls = null ,
33- defaultSidebarPanelWidth = 235 , defaultSidebarPanelHeight = 201 , innerRef = undefined ,
33+ defaultSidebarPanelWidth = 235 , defaultSidebarPanelHeight = 201 ,
3434 } = props ;
3535 const [ sizeRef , size ] = useElementSize ( ) ;
3636 const { t } = useTranslation ( ) ;
@@ -183,7 +183,7 @@ export function CompanionWindow(props) { // eslint-disable-line react/require-de
183183 </ StyledRnd >
184184 </ Root >
185185 ) ;
186- }
186+ } ) ;
187187
188188CompanionWindow . propTypes = {
189189 ariaLabel : PropTypes . string ,
@@ -192,10 +192,6 @@ CompanionWindow.propTypes = {
192192 defaultSidebarPanelHeight : PropTypes . number ,
193193 defaultSidebarPanelWidth : PropTypes . number ,
194194 direction : PropTypes . string . isRequired ,
195- innerRef : PropTypes . oneOfType ( [
196- PropTypes . func ,
197- PropTypes . shape ( { current : PropTypes . instanceOf ( Element ) } ) ,
198- ] ) ,
199195 isDisplayed : PropTypes . bool ,
200196 onCloseClick : PropTypes . func ,
201197 paperClassName : PropTypes . string ,
0 commit comments