我正在尝试在打字稿中获得一个与 Storybook 一起使用的简单按钮组件。我正在关注文档和此示例。
\n我的组件和故事如下:
\n组件/Button.tsx:
\nimport {FC} from \'react\';\n\nexport interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {\n children: React.ReactNode;\n variant: "primary" | "danger";\n shape?: "rounded";\n}\n\nexport const Button: FC<ButtonProps> = ({\n children,\n variant,\n shape,\n ...props\n}) => {\n const classNames = `btn btn-${variant} btn-${shape}`;\n return (\n <button className={classNames} {...props}>\n {children}\n </button>\n );\n};\nRun Code Online (Sandbox Code Playgroud)\n故事/Button.stories.ts
\nimport { ComponentStory, ComponentMeta } from \'@storybook/react\';\n\nimport { Button, ButtonProps } from \'../components/Button\';\n\nexport default {\n /* The title prop is optional.\n * See …Run Code Online (Sandbox Code Playgroud) 当我尝试右键单击 -> 在任何 docker 盒子上附加 shell 时,终端窗口将打开并输出以下内容:
* Executing task: docker exec -it <container_id> bash
zsh:1: command not found: docker
* The terminal process "/bin/zsh '-c', 'docker exec -it <container_id> bash'" failed to launch (exit code: 127).
* Terminal will be reused by tasks, press any key to close it.
Run Code Online (Sandbox Code Playgroud)
当我跑步时docker exec -it <container_id> bash手动运行时,它有效。“附加外壳”下拉选项不起作用。为什么?
我尝试将默认终端更改为 bash,但没有成功。我使用的是配备 M1 芯片的 Mac Monterey 12.1。经过一番挖掘,我发现一个线程提到这可能是 Mac 的问题,但该线程使用的是不同的操作系统版本。