import { AnyTheme, Interpolation, TreeOrInterpolationResult } from './types'; /** * Pick Variant is used to create theme-specific css. * * This example selects an appropriate variable for the current theme. * ``` * import { pickVariant } from '@splunk/themes'; * * ... * * const Wrapper = styled.div` * ${pickVariant('appearance', { * filled: 'background: red', * open: 'border: 1px solid red', * })} * `; * ``` * This example selects an appropriate block of css for the current theme. * ``` * const Wrapper = styled.div` * ${pickVariant('appearance', { * filled: { * enterprise: 'background: green', * prisma: 'background: blue', * }, * open: { * enterprise: 'border: 1px solid green', * prisma: 'border: 1px solid blue', * }, * })} * `; * ``` * @param {string} propName - The prop name used to resolve the variants. The prop value must be a `string` or `boolean`. * @param {object} themeOptions - An object consisting of a tree of theme options, with the prop variants the top of the tree and optional * theme variants below (`enterprise|prisma`, `light|dark`, or `compact|comfortable`). * @returns {function} The returned function is called by `styled-components`, which provides the props and theme context. * @public */ declare const pickVariant: (propName: keyof A, tree: { [x: string]: TreeOrInterpolationResult; }) => Interpolation; export default pickVariant;