resolveStyle
function resolveStyle( style, columns, _rows): ResolvedStyle;Resolve all Responsive values in a Style to produce a ResolvedStyle with only concrete values.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
style | Style | The (possibly responsive) style object from a component. |
columns | number | Current terminal width in columns. |
_rows | number | Current terminal height in rows (reserved for future row-based breakpoints). |
Returns
Section titled “Returns”A new style object with every responsive value collapsed.
Example
Section titled “Example”const resolved = resolveStyle( { padding: { base: 0, md: 1 }, bg: "red" }, 100, 40,);// => { padding: 1, bg: "red" }