mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-09 10:37:22 +02:00
Add and use clsx (classnames alternative) (#2249)
Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import "./Island.scss";
|
||||
|
||||
import React from "react";
|
||||
import clsx from "clsx";
|
||||
|
||||
type IslandProps = {
|
||||
children: React.ReactNode;
|
||||
@@ -12,7 +13,7 @@ type IslandProps = {
|
||||
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
||||
({ children, padding, className, style }, ref) => (
|
||||
<div
|
||||
className={`${className ?? ""} Island`}
|
||||
className={clsx("Island", className)}
|
||||
style={{ "--padding": padding, ...style } as React.CSSProperties}
|
||||
ref={ref}
|
||||
>
|
||||
|
Reference in New Issue
Block a user