2021-11-07 06:41:09 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { Meta, Story } from "@storybook/react";
|
|
|
|
|
import { noop } from "lodash";
|
|
|
|
|
|
2022-04-22 16:45:35 +00:00
|
|
|
import { ITarget } from "interfaces/target";
|
|
|
|
|
// @ts-ignore
|
2021-11-07 06:41:09 +00:00
|
|
|
import SelectedTargetsDropdown from ".";
|
|
|
|
|
|
|
|
|
|
import "../../../../index.scss";
|
|
|
|
|
|
|
|
|
|
interface ISelectedTargetsDropdownProps {
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
error?: string;
|
|
|
|
|
label?: string;
|
|
|
|
|
selectedTargets?: ITarget[];
|
|
|
|
|
targetsCount?: number;
|
|
|
|
|
queryId?: number;
|
|
|
|
|
isPremiumTier?: boolean;
|
|
|
|
|
onSelect: () => void;
|
|
|
|
|
onFetchTargets?: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
component: SelectedTargetsDropdown,
|
|
|
|
|
title: "Components/SelectTargetsDropdown",
|
|
|
|
|
args: {
|
|
|
|
|
disabled: false,
|
|
|
|
|
label: "Select Targets",
|
|
|
|
|
selectedTargets: [],
|
|
|
|
|
targetsCount: 0,
|
|
|
|
|
queryId: 1,
|
|
|
|
|
onFetchTargets: noop,
|
|
|
|
|
onSelect: noop,
|
|
|
|
|
},
|
|
|
|
|
} as Meta;
|
|
|
|
|
|
|
|
|
|
const Template: Story<ISelectedTargetsDropdownProps> = (props) => (
|
|
|
|
|
<SelectedTargetsDropdown {...props} />
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const Default = Template.bind({});
|