UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

23 lines (22 loc) 771 B
import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from "react"; import classNames from "classnames"; /** Element that will only be visible if closest `<Container>` is wider than * `from` and/or narrower than `to`. * `xs` = 300px, * `small` = 600px, * `medium` = 960px, * `large` = 1280px, * `xl` = 1600px, * `xxl` = 1920px */ const ContainerBreakpoint = /*#__PURE__*/ forwardRef(({ className, from, to, ...props }, ref)=>{ return /*#__PURE__*/ _jsx("div", { ...props, className: classNames(className, { [`from-${from}-container`]: from, [`to-${to}-container`]: to }), ref: ref }); }); ContainerBreakpoint.displayName = "Container.Breakpoint"; export default ContainerBreakpoint;