Ingen beskrivning

index-44e17595.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. var _commonjsHelpers = require("./_commonjsHelpers-72d386ba.js");
  3. var classnames = _commonjsHelpers.createCommonjsModule(function(module) {
  4. /*!
  5. Copyright (c) 2017 Jed Watson.
  6. Licensed under the MIT License (MIT), see
  7. http://jedwatson.github.io/classnames
  8. */
  9. /* global define */
  10. (function() {
  11. var hasOwn = {}.hasOwnProperty;
  12. function classNames() {
  13. var classes = [];
  14. for (var i = 0; i < arguments.length; i++) {
  15. var arg = arguments[i];
  16. if (!arg) continue;
  17. var argType = typeof arg;
  18. if (argType === "string" || argType === "number") {
  19. classes.push(arg);
  20. } else if (Array.isArray(arg) && arg.length) {
  21. var inner = classNames.apply(null, arg);
  22. if (inner) {
  23. classes.push(inner);
  24. }
  25. } else if (argType === "object") {
  26. for (var key in arg) {
  27. if (hasOwn.call(arg, key) && arg[key]) {
  28. classes.push(key);
  29. }
  30. }
  31. }
  32. }
  33. return classes.join(" ");
  34. }
  35. if (module.exports) {
  36. classNames.default = classNames;
  37. module.exports = classNames;
  38. } else {
  39. window.classNames = classNames;
  40. }
  41. })();
  42. });
  43. exports.classnames = classnames;
  44. //# sourceMappingURL=index-44e17595.js.map