Add and use clsx (classnames alternative) (#2249)
Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
@ -2,6 +2,7 @@ import "./Modal.scss";
|
||||
|
||||
import React, { useState, useLayoutEffect } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
import clsx from "clsx";
|
||||
import { KEYS } from "../keys";
|
||||
|
||||
export const Modal = (props: {
|
||||
@ -26,7 +27,7 @@ export const Modal = (props: {
|
||||
|
||||
return createPortal(
|
||||
<div
|
||||
className={`Modal ${props.className ?? ""}`}
|
||||
className={clsx("Modal", props.className)}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
onKeyDown={handleKeydown}
|
||||
|
Reference in New Issue
Block a user