mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Wrap code text in template readme files (#2562)
This commit is contained in:
@@ -19,7 +19,19 @@ Example.args = {
|
||||
export const SmallViewport = Template.bind({})
|
||||
SmallViewport.args = {
|
||||
template: Mocks.MockTemplate,
|
||||
activeTemplateVersion: Mocks.MockTemplateVersion,
|
||||
activeTemplateVersion: {
|
||||
...Mocks.MockTemplateVersion,
|
||||
readme: `---
|
||||
name:Template test
|
||||
---
|
||||
## Instructions
|
||||
You can add instructions here
|
||||
|
||||
[Some link info](https://coder.com)
|
||||
\`\`\`
|
||||
# This is a really long sentence to test that the code block wraps into a new line properly.
|
||||
\`\`\``,
|
||||
},
|
||||
templateResources: [Mocks.MockWorkspaceResource, Mocks.MockWorkspaceResource2],
|
||||
}
|
||||
SmallViewport.parameters = {
|
||||
|
||||
@@ -83,6 +83,12 @@ export const useStyles = makeStyles((theme) => {
|
||||
markdownWrapper: {
|
||||
background: theme.palette.background.paper,
|
||||
padding: theme.spacing(3.5),
|
||||
|
||||
// Adds text wrapping to <pre> tag added by ReactMarkdown
|
||||
"& pre": {
|
||||
whiteSpace: "pre-wrap",
|
||||
wordWrap: "break-word",
|
||||
},
|
||||
},
|
||||
resourcesTableContents: {
|
||||
margin: 0,
|
||||
|
||||
Reference in New Issue
Block a user