You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BottomSheetContainer.tsx 641B

12345678910111213141516171819202122
  1. import React, { Fragment } from 'react';
  2. import { useSelector } from 'react-redux';
  3. import { IReduxState } from '../../../../app/types';
  4. const BottomSheetContainer: () => JSX.Element | null = (): JSX.Element | null => {
  5. const { sheet, sheetProps } = useSelector((state: IReduxState) => state['features/base/dialog']);
  6. const { reducedUI } = useSelector((state: IReduxState) => state['features/base/responsive-ui']);
  7. if (!sheet || reducedUI) {
  8. return null;
  9. }
  10. return (
  11. <Fragment>
  12. { React.createElement(sheet, sheetProps) }
  13. </Fragment>
  14. );
  15. };
  16. export default BottomSheetContainer;