Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Update RoomSettingModal.js #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update RoomSettingModal.js #51

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 15, 2021

I tried to add a close button for RoomSettings Form.

Copy link
Contributor

@lunatite lunatite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Fragment is used to group multiple elements together without having to add extra nodes to the DOM ( https://reactjs.org/docs/fragments.html ) . Right now , you are using this incorrectly because React.Fragment doesn't take these props ( you probably want to do this with a Modal ). Change React.Fragment to Modal to change components.

@@ -84,7 +85,10 @@ export const RoomSettingModal = (props) => {
}

return (
<React.Fragment>
<React.Fragment onHide={props.onHide} show={props.show}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change React.Fragment to Modal to use the Modal component instead.

@@ -84,7 +85,10 @@ export const RoomSettingModal = (props) => {
}

return (
<React.Fragment>
<React.Fragment onHide={props.onHide} show={props.show}>
<Modal.Header closeButton>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use self closing tags if there is no content inside the component. <Modal.Header closeButton/>

@lunatite
Copy link
Contributor

Make sure the RoomSettingModal component is getting passed the props that is needed to use the Modal or else it won't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant