keycloak-scim/src/stories/MapperList.stories.tsx
Erik Jan de Wit acbd5a5f18
created a MockAdminClient for the storybook (#240)
* added mock for admin client so stories work again

* updated storybook to 6.1.7

* added js doc

* fix merge error
2020-12-04 13:58:28 -05:00

21 lines
737 B
TypeScript

import React from "react";
import { Meta } from "@storybook/react";
import serverInfo from "../context/server-info/__tests__/mock.json";
import clientScopeMock from "../client-scopes/__tests__/mock-client-scope.json";
import { ServerInfoContext } from "../context/server-info/ServerInfoProvider";
import { MapperList } from "../client-scopes/details/MapperList";
import { MockAdminClient } from "./MockAdminClient";
export default {
title: "Mapper List",
component: MapperList,
} as Meta;
export const MapperListExample = () => (
<ServerInfoContext.Provider value={serverInfo}>
<MockAdminClient>
<MapperList clientScope={clientScopeMock} refresh={() => {}} />
</MockAdminClient>
</ServerInfoContext.Provider>
);