UNPKG

@sparkpost/matchbox

Version:
46 lines (45 loc) 1.13 kB
/** * Omits styled system props from an object * @param {Object} props * @param {Array} names * * @example * import { margin } from 'styled-system'; * * omit({ my: '100', className: 'classs' }, margin.propNames) * > { className: 'class' } */ export declare function omit(props: { [k: string]: any; }, names: string[]): { [k: string]: any; }; /** * Picks styled system props from an object * @param {Object} props * @param {Array} names * * @example * import { margin } from 'styled-system'; * * pick({ my: '100', py: '100' }, margin.propNames) * > { my: '100' } */ export declare function pick(props: { [k: string]: any; }, names: string[]): { [k: string]: any; }; /** * Returns a configuration object for styled-components with omitted props, to be used with .withConfig * @param {Array} arr * @param {Object} config * * @see https://styled-components.com/docs/api#shouldforwardprop */ export declare function clean(arr?: string[], config?: { [k: string]: any; }): { shouldForwardProp: (prop: string, defaultFn: (prop: string) => boolean) => boolean; [k: string]: any; };