-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #452 from AppQuality/develop
Add menu/select items stories and add player.shortcuts
- Loading branch information
Showing
20 changed files
with
488 additions
and
99 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { StatusRunningIcon } from "../icons"; | ||
|
||
import { DotsMenu } from "."; | ||
|
||
type Args = React.ComponentProps<typeof DotsMenu.Item> & { | ||
contentType?: string; | ||
}; | ||
|
||
const meta = { | ||
title: "Atoms/DotsMenuItem", | ||
component: DotsMenu.Item, | ||
|
||
parameters: { | ||
docs: { | ||
description: { | ||
component: "Available only inside a `DotsMenu` component.", | ||
}, | ||
}, | ||
}, | ||
argTypes: { | ||
contentType: { | ||
options: ["simple", "withMeta"], | ||
control: { | ||
type: "select", | ||
}, | ||
}, | ||
}, | ||
|
||
decorators: [ | ||
(Story) => ( | ||
<DotsMenu isExpanded={true}> | ||
<Story /> | ||
</DotsMenu> | ||
), | ||
], | ||
|
||
render: ({ contentType, ...args }) => { | ||
return ( | ||
<DotsMenu.Item {...args}> | ||
{contentType === "simple" && "Acacia"} | ||
{contentType === "withMeta" && ( | ||
<> | ||
Acacia | ||
<DotsMenu.Item.Meta>Daisy</DotsMenu.Item.Meta> | ||
</> | ||
)} | ||
</DotsMenu.Item> | ||
); | ||
}, | ||
args: { | ||
contentType: "simple", | ||
value: "acacia", | ||
}, | ||
} satisfies Meta<Args>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; | ||
|
||
export const WithMeta: Story = { | ||
args: { | ||
contentType: "withMeta", | ||
}, | ||
}; | ||
|
||
export const Disabled: Story = { | ||
args: { | ||
isDisabled: true, | ||
}, | ||
}; | ||
|
||
export const WithIcon: Story = { | ||
args: { | ||
icon: <StatusRunningIcon />, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.