import {JSX, mergeProps, splitProps} from "solid-js"; import classNames from "./classnames"; import {useBootstrapPrefix} from "./ThemeProvider"; import {BsPrefixProps, BsPrefixRefForwardingComponent} from "./helpers"; import {Dynamic} from "solid-js/web"; export interface ContainerProps extends BsPrefixProps, JSX.HTMLAttributes { fluid?: boolean | string | "sm" | "md" | "lg" | "xl" | "xxl"; } const defaultProps = { as: "div", fluid: false, }; const Container: BsPrefixRefForwardingComponent<"div", ContainerProps> = (p: ContainerProps) => { const [local, props] = splitProps(mergeProps(defaultProps, p), [ "as", "bsPrefix", "fluid", "class", ]); const prefix = useBootstrapPrefix(local.bsPrefix, "container"); const suffix = typeof local.fluid === "string" ? `-${local.fluid}` : "-fluid"; return ( ); }; export default Container;