import { jsx } from '@emotion/core';
import { createContext, useContext } from 'react';
import _pt from 'prop-types';

var DensityContext = createContext("DEFAULT");
function DensityProvider(_ref) {
  var _ref$density = _ref.density,
      density = _ref$density === void 0 ? "DEFAULT" : _ref$density,
      children = _ref.children;
  return jsx(DensityContext.Provider, {
    value: density
  }, children);
}
DensityProvider.propTypes = {
  density: _pt.oneOf(["DENSE", "DEFAULT", "LOOSE"]),
  children: _pt.node
};
function useDensity() {
  return useContext(DensityContext);
}
DensityProvider.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "DensityProvider",
  "props": {
    "density": {
      "defaultValue": {
        "value": "`DEFAULT`",
        "computed": false
      },
      "required": false,
      "tsType": {
        "name": "union",
        "raw": "`DENSE` | `DEFAULT` | `LOOSE`",
        "elements": [{
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }, {
          "name": "literal",
          "value": "undefined"
        }]
      },
      "description": ""
    },
    "children": {
      "required": false,
      "tsType": {
        "name": "ReactReactNode",
        "raw": "React.ReactNode"
      },
      "description": ""
    }
  }
};

if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
  STORYBOOK_REACT_CLASSES["src/components/DensityProvider/DensityProvider.tsx"] = {
    name: "DensityProvider",
    docgenInfo: DensityProvider.__docgenInfo,
    path: "src/components/DensityProvider/DensityProvider.tsx"
  };
}

export { DensityProvider, useDensity };
//# sourceMappingURL=DensityProvider.esm.js.map
