({
onRequestClose,
...props
}: SquadTourModalProps)
| 12 | }; |
| 13 | |
| 14 | function SquadTourModal({ |
| 15 | onRequestClose, |
| 16 | ...props |
| 17 | }: SquadTourModalProps): ReactElement { |
| 18 | const { onCloseTour } = useSquadTour(); |
| 19 | const onModalClose: typeof onRequestClose = (param) => { |
| 20 | onCloseTour(); |
| 21 | onRequestClose?.(param); |
| 22 | }; |
| 23 | |
| 24 | return ( |
| 25 | <Modal |
| 26 | {...props} |
| 27 | onRequestClose={onModalClose} |
| 28 | kind={Modal.Kind.FlexibleCenter} |
| 29 | size={Modal.Size.Small} |
| 30 | className="overflow-hidden !border-accent-cabbage-default" |
| 31 | isDrawerOnMobile |
| 32 | drawerProps={{ className: { drawer: 'pb-4', close: 'mx-4' } }} |
| 33 | > |
| 34 | <SquadTour onClose={() => onModalClose(undefined)} /> |
| 35 | <ModalClose |
| 36 | size={ButtonSize.Small} |
| 37 | variant={ButtonVariant.Secondary} |
| 38 | top="3" |
| 39 | right="3" |
| 40 | onClick={onModalClose} |
| 41 | /> |
| 42 | </Modal> |
| 43 | ); |
| 44 | } |
| 45 | |
| 46 | export default SquadTourModal; |
nothing calls this directly
no test coverage detected