%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/styled-components/src/utils/
Upload File :
Create Path :
Current File : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/styled-components/src/utils/isStaticRules.ts

import { RuleSet } from '../types';
import isFunction from './isFunction';
import isStyledComponent from './isStyledComponent';

export default function isStaticRules<Props extends object>(rules: RuleSet<Props>) {
  for (let i = 0; i < rules.length; i += 1) {
    const rule = rules[i];

    if (isFunction(rule) && !isStyledComponent(rule)) {
      // functions are allowed to be static if they're just being
      // used to get the classname of a nested styled component
      return false;
    }
  }

  return true;
}

Zerion Mini Shell 1.0