Files
coder/site/components/CodeBlock/index.stories.tsx
T
Bryan df13fef161 fix: Remove 'Create Project' button, replace with CLI prompt (#245)
For black-triangle and alpha builds, we won't be able to create projects in the UI, because they require collecting and tar'ing a set of assets associated with the project - so the CLI is going to be our entry point for creating projects.

This shifts the UI to remove the 'Create Project' button, and adds a prompt to copy a command to run.

__Before:__
<img width="1134" alt="image" src="https://user-images.githubusercontent.com/88213859/153534269-58dc95bd-0417-4bed-8e62-e2b6f479da61.png">

__After:__
![2022-02-10 19 38 01](https://user-images.githubusercontent.com/88213859/153534227-d22bd786-8c43-4858-bda6-3d9d1d614711.gif)
2022-02-10 21:37:58 -08:00

25 lines
710 B
TypeScript

import { Story } from "@storybook/react"
import React from "react"
import { CodeBlock, CodeBlockProps } from "./index"
const sampleLines = `Successfully assigned coder/image-jcws7 to cluster-1
Container image "gcr.io/coder-dogfood/master/coder-dev-ubuntu@sha256" already present on machine
Created container user
Started container user
Using user 'coder' with shell '/bin/bash'`.split("\n")
export default {
title: "CodeBlock",
component: CodeBlock,
argTypes: {
lines: { control: "text", defaultValue: sampleLines },
},
}
const Template: Story<CodeBlockProps> = (args: CodeBlockProps) => <CodeBlock {...args} />
export const Example = Template.bind({})
Example.args = {
lines: sampleLines,
}