2020-01-15 20:42:02 +05:00
|
|
|
import "./Island.css";
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
2020-04-04 02:58:50 +09:00
|
|
|
type IslandProps = {
|
|
|
|
children: React.ReactNode;
|
|
|
|
padding?: number;
|
|
|
|
className?: string;
|
|
|
|
};
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-03-13 15:32:47 -04:00
|
|
|
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
2020-04-04 02:58:50 +09:00
|
|
|
({ children, padding, className }, ref) => (
|
2020-01-15 20:42:02 +05:00
|
|
|
<div
|
2020-04-04 02:58:50 +09:00
|
|
|
className={`${className ?? ""} Island`}
|
2020-01-15 20:42:02 +05:00
|
|
|
style={{ "--padding": padding } as React.CSSProperties}
|
2020-03-13 15:32:47 -04:00
|
|
|
ref={ref}
|
2020-01-15 20:42:02 +05:00
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</div>
|
2020-03-13 15:32:47 -04:00
|
|
|
),
|
|
|
|
);
|