import XNode from "@web-atoms/core/dist/core/XNode";
import StyleRule from "@web-atoms/core/dist/style/StyleRule";
import CSS from "@web-atoms/core/dist/web/styles/CSS";

CSS(StyleRule()
    .maximizeAbsolute()
    .verticalFlexLayout({ alignItems: "center", justifyContent: "center"})
, "div[data-align-center=align-center]");

export default function Center(a: any, ... nodes: XNode[]) {
    return <div
        data-align-center="align-center"
        { ... a}>
        { ... nodes }
    </div>;
}
