Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
Orbit style props accepts a specialized syntax to support responsive breakpoints.
By passing an object to any style props, you can specify which style will be applied at different breakpoints. These rules are on a min-width
basis meaning that a sm
value will apply from 768px
and up until another higher breakpoint matches.
Lost in space.
Not all breakpoints must be explicitly defined. In the following example, base
and lg
breakpoints are explicitly declared. When match, the xl
breakpoint will implicitly take the value set by the lg
breakpoint since it is wider than lg
. Everything below lg
inherits the base
color.
Lost in space.
To resolve a responsive value within a React component, Orbit provides the useResponsiveValue
hook.
import { useResponsiveValue } from "@sharegate/orbit-ui";const fluidValue = useResponsiveValue({ base: true, lg: false });
The following responsive breakpoints are supported by Orbit style props and acts as their CSS media query counterparts:
Size | Media query |
---|---|
xs | min-width: 640px |
sm | min-width: 768px |
md | min-width: 1024px |
lg | min-width: 1280px |
xl | min-width: 1440px |