fleet/frontend/components/buttons/Button/Button.stories.tsx
Roberto Dip 33d788caed
add support for displaying EULA during ADE/DEP (#11532)
Related to #11350 and the sub-tasks for stuff that happens in setup
assistant: #11477 and #11479

This adds back-end and UI logic to show an EULA during DEP enrollment if
one was uploaded via the UI, if an EULA wasn't uploaded, we just proceed
to enroll the device right after authentication.


https://user-images.githubusercontent.com/4419992/236316655-282ee74a-5f79-4095-a950-82b77b80a5c0.mov
2023-05-05 14:36:13 -03:00

60 lines
1.2 KiB
TypeScript

import React from "react";
import { Meta, Story } from "@storybook/react";
import { noop } from "lodash";
import Button from ".";
import { IButtonProps } from "./Button";
import "../../../index.scss";
export default {
component: Button,
title: "Components/Button",
argTypes: {
variant: {
options: [
"brand",
"success",
"alert",
"blue-green",
"grey",
"warning",
"link",
"label",
"text-link",
"text-icon",
"inverse",
"inverse-alert",
"block",
"unstyled",
"unstyled-modal-query",
"contextual-nav-item",
"small-text-icon",
"oversized",
],
control: "select",
},
type: {
options: ["button", "submit", "reset"],
control: "select",
},
},
args: {
autofocus: false,
className: "",
size: "",
tabIndex: 0,
title: "",
onClick: noop,
},
} as Meta;
const Template: Story<IButtonProps> = (props) => (
<Button {...props}>Click Here</Button>
);
export const Default = Template.bind({});
Default.args = { variant: "brand", type: "button" };
export const Disabled = Template.bind({});
Disabled.args = { ...Default.args, disabled: true };