diff --git a/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx new file mode 100644 index 00000000..df48f591 --- /dev/null +++ b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.stories.tsx @@ -0,0 +1,75 @@ +import { Meta } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; + +import { AccessLevelDropdown } from './access-level-dropdown'; +import { Input } from '@atoms/input/input-text'; + +const meta: Meta = { + component: AccessLevelDropdown, + argTypes: { + level: { + options: "none read write manage".split(' '), + }, + size: { + options: "(empty string),sm,md,lg".split(','), + mapping: { '(empty string)': '' }, + }, + } +}; +export default meta; + +export const Default = { + args: { + level: "manage", + disabled: false, + className: '', + hiddenLevels: [], + size: 'md', + labelOverrides: {}, + onChange: action('onChange'), + }, + render: (props: React.ComponentProps) => <> + +
Level "none" has a different appearance:
+ + , +}; + +export const NoRemoveAndRenameNone = { + args: { + ...Default.args, + hiddenLevels: ['remove'], + labelOverrides: { none: "I can't do that, Dave." }, + }, +}; + +export const EndOfInputBox = { + args: { + ...Default.args, + }, + render: (props: React.ComponentProps) => <> +
+
+ +
+
+ +
+
+ , +}; + +export const BorderLess = { + args: { + ...Default.args, + className: '!p-0 leading-tight text-end !pr-8 border-none bg-transparent dark:bg-transparent', + }, +}; diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/public-link/copy-link-button.stories.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/public-link/copy-link-button.stories.tsx new file mode 100644 index 00000000..4d3c0729 --- /dev/null +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/public-link/copy-link-button.stories.tsx @@ -0,0 +1,14 @@ +import { Meta } from '@storybook/react'; + +import { CopyLinkButton } from './copy-link-button'; + +const meta: Meta = { + component: CopyLinkButton, +}; +export default meta; + +export const Default = { + args: { + textToCopy: "I should be in your clipboard", + }, +}; \ No newline at end of file