Lipis facde7ace0
Fix padding in the library loading buttons (#2331)
* Fix padding in the library loading buttons

* Update src/components/Stack.tsx

Co-authored-by: Dominic Lee <34794189+dominictwlee@users.noreply.github.com>

* extend CSSProperties TS definition

Co-authored-by: Dominic Lee <34794189+dominictwlee@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-11-04 11:05:12 +01:00

24 lines
485 B
TypeScript

import "./Island.scss";
import React from "react";
import clsx from "clsx";
type IslandProps = {
children: React.ReactNode;
padding?: number;
className?: string | boolean;
style?: object;
};
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
({ children, padding, className, style }, ref) => (
<div
className={clsx("Island", className)}
style={{ "--padding": padding, ...style }}
ref={ref}
>
{children}
</div>
),
);