Skip to content

Commit 69e95ce

Browse files
committed
Make it pritty
1 parent 36b554a commit 69e95ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Toast/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import useEventListener from '../hooks/useEventListener';
55
const Toast = ({ onOpen, onClose, className, children, onDismiss, onSubmit, ...rest }) => {
66
const hxRef = useEventListener({ onDismiss, onSubmit });
77
return (
8-
<div> {/* Wrappping element needed: Otherwise when alert removes itself from DOM on close, it will cause error */}
8+
<div>
9+
{/* Wrapping element needed: Otherwise when alert removes itself from DOM on close, it will cause error */}
910
<hx-toast class={className} ref={hxRef} {...rest}>
1011
{children}
1112
</hx-toast>
@@ -16,7 +17,7 @@ const Toast = ({ onOpen, onClose, className, children, onDismiss, onSubmit, ...r
1617
Toast.propTypes = {
1718
className: PropTypes.string,
1819
children: PropTypes.node.isRequired,
19-
type: PropTypes.oneOf(['info','error','success']),
20+
type: PropTypes.oneOf(['info', 'error', 'success']),
2021
cta: PropTypes.string,
2122
onDismiss: PropTypes.func,
2223
onSubmit: PropTypes.func,

0 commit comments

Comments
 (0)