2022-06-20 09:50:40 +00:00
|
|
|
import React, { Fragment } from 'react';
|
2022-06-20 14:53:19 +00:00
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
|
2022-10-20 09:11:27 +00:00
|
|
|
import { IReduxState } from '../../../../app/types';
|
2022-09-05 11:24:13 +00:00
|
|
|
|
2022-06-20 14:53:19 +00:00
|
|
|
|
2022-09-08 09:52:36 +00:00
|
|
|
const BottomSheetContainer: () => JSX.Element | null = (): JSX.Element | null => {
|
2022-10-20 09:11:27 +00:00
|
|
|
const { sheet, sheetProps } = useSelector((state: IReduxState) => state['features/base/dialog']);
|
|
|
|
const { reducedUI } = useSelector((state: IReduxState) => state['features/base/responsive-ui']);
|
2022-06-20 14:53:19 +00:00
|
|
|
|
|
|
|
if (!sheet || reducedUI) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2022-06-20 09:50:40 +00:00
|
|
|
<Fragment>
|
2022-06-20 14:53:19 +00:00
|
|
|
{ React.createElement(sheet, sheetProps) }
|
2022-06-20 09:50:40 +00:00
|
|
|
</Fragment>
|
2022-06-20 14:53:19 +00:00
|
|
|
);
|
2022-07-11 12:30:37 +00:00
|
|
|
};
|
2022-06-20 14:53:19 +00:00
|
|
|
|
|
|
|
export default BottomSheetContainer;
|