84ad3853a8
* move common cell formatters to util functions * renamed ExternalLink FormattedLink
35 lines
900 B
TypeScript
35 lines
900 B
TypeScript
import React from "react";
|
|
import { Meta, Story } from "@storybook/react";
|
|
import { FormattedLink } from "../components/external-link/FormattedLink";
|
|
import { ButtonProps } from "@patternfly/react-core";
|
|
|
|
export default {
|
|
title: "Formatted link",
|
|
component: FormattedLink,
|
|
} as Meta;
|
|
|
|
const Template: Story<ButtonProps> = (args) => <FormattedLink {...args} />;
|
|
|
|
export const WithTitle = Template.bind({});
|
|
WithTitle.args = {
|
|
title: "With title",
|
|
href: "http://test.nl",
|
|
};
|
|
|
|
export const WithoutTitle = Template.bind({});
|
|
WithoutTitle.args = {
|
|
href: "http://some-other-link.nl/super",
|
|
};
|
|
|
|
export const ApplicationLink = Template.bind({});
|
|
ApplicationLink.args = {
|
|
title: "Application link",
|
|
href: "/application/main",
|
|
};
|
|
|
|
export const DisabledLink = Template.bind({});
|
|
DisabledLink.args = {
|
|
title: "Disabled link",
|
|
href: "http://some-other-link.nl/super",
|
|
isAriaDisabled: true,
|
|
};
|