Skip to content

Commit

Permalink
making the component name/params more understandable.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Apr 30, 2024
1 parent 241bb8b commit cb59c6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Fragment } from 'react';
import { Map } from '@components/map';
import FloatingDialog from '@utils/dialog-utils';
import BaseFloatingDialog from "@utils/dialog-utils";
// import SubObj from "@utils/subObj";

export const App = () => {
return (
<Fragment>
<FloatingDialog title={"A title"} dialogText={"the dialog text"} openDialog={true}/>
<BaseFloatingDialog title={"A title"} dialogText={"the dialog text"} openDialogImmediately={true}/>
<Map />
</Fragment>
);
Expand Down
8 changes: 4 additions & 4 deletions src/utils/dialog-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const Transition = React.forwardRef(function Transition(props, ref) {
* @returns {JSX.Element}
* @constructor
*/
export default function FloatingDialog({ title, dialogText, openDialog}) { //, dialogObject
const [open, setOpen] = React.useState(openDialog);
export default function BaseFloatingDialog({ title, dialogText, openDialogImmediately} ) { //, dialogObject
const [open, setOpen] = React.useState(openDialogImmediately);

// closes the dialog
const handleClose = () => {
Expand Down Expand Up @@ -79,9 +79,9 @@ export default function FloatingDialog({ title, dialogText, openDialog}) { //, d
};

// define the properties of this component
FloatingDialog.propTypes = {
BaseFloatingDialog.propTypes = {
title: PropTypes.string,
dialogText: PropTypes.string,
openDialog: PropTypes.bool
openDialogImmediately: PropTypes.bool
// dialogObject: PropTypes.any
};

0 comments on commit cb59c6b

Please sign in to comment.