import * as React from 'react';
import * as path from 'path';
import { createApp, Markdown, examplesOf } from '@uifabric/example-app-base';
import { ThemeProvider } from '@fluentui/react-theme-provider';
import '@fluentui/ie11-polyfills';
var req = require.context('../components', true, /\.stories\.tsx$/, 'sync');
var exampleWithTheme = function (example) { return function () { return React.createElement(ThemeProvider, null, example()); }; };
createApp(
// List of examples
req.keys().map(function (key) {
    var storiesModule = req(key);
    var exampleGroup = examplesOf(path.basename(key, '.stories.tsx'));
    for (var _i = 0, _a = Object.keys(storiesModule); _i < _a.length; _i++) {
        var exampleName = _a[_i];
        exampleGroup.add(exampleName, exampleWithTheme(storiesModule[exampleName]));
    }
    return exampleGroup;
}), 
// Intro page
function () { return (React.createElement("div", { style: { marginTop: -20, padding: 40 } },
    React.createElement(Markdown, null, require('!raw-loader!@fluentui/react-button/README.md')))); }, 'React Button Examples');
//# sourceMappingURL=index.js.map