1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-18 21:09:40 +02:00
portainer/app/react/components/buttons/CopyButton/CopyButton.stories.tsx
Ali 4ee349bd6b feat(helm): helm actions [r8s-259] (#715)
Co-authored-by: James Player <james.player@portainer.io>
Co-authored-by: Cara Ryan <cara.ryan@portainer.io>
Co-authored-by: stevensbkang <skan070@gmail.com>
2025-05-13 22:15:04 +12:00

38 lines
875 B
TypeScript

import { Meta, Story } from '@storybook/react';
import { PropsWithChildren } from 'react';
import { CopyButton, Props } from './CopyButton';
export default {
component: CopyButton,
title: 'Components/Buttons/CopyButton',
} as Meta;
function Template({
copyText,
displayText,
children,
}: JSX.IntrinsicAttributes & PropsWithChildren<Props>) {
return (
<CopyButton
copyText={copyText}
displayText={displayText}
data-cy="copy-button"
>
{children}
</CopyButton>
);
}
export const Primary: Story<PropsWithChildren<Props>> = Template.bind({});
Primary.args = {
children: 'Copy',
copyText: 'this will be copied to clipboard',
};
export const NoCopyText: Story<PropsWithChildren<Props>> = Template.bind({});
NoCopyText.args = {
children: 'Copy without copied text',
copyText: 'clipboard override',
displayText: '',
};