UNPKG

@hanamura/react-containers

Version:
17 lines 705 B
'use client'; import { useAdaptiveContainer } from '../core'; /** * Switcher component - displays different content based on the active breakpoint * * Features: * - Switches between different content elements based on current breakpoint * - Renders whatever content is specified for the active breakpoint * - Only renders one content element at a time * - Does not add any additional container element */ export function Switcher({ options, queries, adaptiveOptions }) { // Get the current options based on active breakpoint const { options: mergedOptions } = useAdaptiveContainer(options, queries, adaptiveOptions); return mergedOptions.content; } //# sourceMappingURL=Switcher.js.map