{"size": 1212, "ext": "js", "max_stars_repo_path": "src/mantine-demos/cjs/demos/hooks/use-color-scheme.js", "max_stars_repo_name": "b93de3d/mantine-fork", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/mantine-demos/cjs/demos/hooks/use-color-scheme.js", "max_issues_repo_name": "b93de3d/mantine-fork", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/mantine-demos/cjs/demos/hooks/use-color-scheme.js", "max_forks_repo_name": "b93de3d/mantine-fork", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.1860465116, "max_line_length": 110, "alphanum_fraction": 0.6732673267}
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var core = require('@mantine/core');
var hooks = require('@mantine/hooks');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const code = `
import { Badge } from '@mantine/core';
import { useColorScheme } from '@mantine/hooks';

export function Demo() {
  const colorScheme = useColorScheme();

  return (
    <Badge color={colorScheme === 'dark' ? 'blue' : 'teal'} variant="filled">
      Your system color scheme is {colorScheme}
    </Badge>
  );
}`;
function Demo() {
  const colorScheme = hooks.useColorScheme();
  return /* @__PURE__ */ React__default.createElement(core.Group, {
    position: "center"
  }, /* @__PURE__ */ React__default.createElement(core.Badge, {
    color: colorScheme === "dark" ? "blue" : "teal",
    variant: "filled"
  }, "Your system color scheme is ", colorScheme));
}
const useColorSchemeHooks = {
  type: "demo",
  code,
  component: Demo
};

exports.useColorSchemeHooks = useColorSchemeHooks;
//# sourceMappingURL=use-color-scheme.js.map
