Skip to content

Commit

Permalink
chore: merge shellbox into codebox (#5425)
Browse files Browse the repository at this point in the history
  • Loading branch information
araujogui authored Jul 13, 2023
1 parent 0a486ad commit cfb93f1
Show file tree
Hide file tree
Showing 19 changed files with 586 additions and 521 deletions.
259 changes: 249 additions & 10 deletions components/Article/Codebox/__snapshots__/index.stories.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Article/Codebox Default smoke-test 1`] = `
<pre>
<pre tabindex="0">
<div>
<div>
<button type="button">
<button type="button"
data-selected="true"
>
js
</button>
</div>
<button type="button">
copy
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
</div>
<div>
<code>
<span>
const
</span>
Expand All @@ -26,26 +49,195 @@ exports[`Article/Codebox Default smoke-test 1`] = `
<span>
;
</span>
</code>
</pre>
`;

exports[`Article/Codebox HiddenHeader smoke-test 1`] = `
<pre tabindex="0">
<div>
<div>
<button type="button"
data-selected="true"
>
js
</button>
</div>
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
</div>
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
<code>
<span>
const
</span>
a
<span>
=
</span>
<span>
1
</span>
<span>
;
</span>
</code>
</pre>
`;

exports[`Article/Codebox MultiLang smoke-test 1`] = `
<pre>
<pre tabindex="0">
<div>
<div>
<button type="button">
<button type="button"
data-selected="true"
>
cjs
</button>
<button type="button">
<button type="button"
data-selected="false"
>
mjs
</button>
</div>
<button type="button">
copy
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
</div>
<code>
<span>
const
</span>
http
<span>
=
</span>
<span>
require
</span>
<span>
(
</span>
<span>
'http'
</span>
<span>
)
</span>
<span>
;
</span>
</code>
</pre>
`;

exports[`Article/Codebox MultiLangWithTextToCopy smoke-test 1`] = `
<pre tabindex="0">
<div>
<div>
<button type="button"
data-selected="true"
>
cjs
</button>
<button type="button"
data-selected="false"
>
mjs
</button>
</div>
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
</div>
<code>
<span>
const
</span>
Expand All @@ -68,6 +260,53 @@ exports[`Article/Codebox MultiLang smoke-test 1`] = `
<span>
;
</span>
</code>
</pre>
`;

exports[`Article/Codebox Shell smoke-test 1`] = `
<pre tabindex="0">
<div>
<div>
<button type="button"
data-selected="true"
>
shell
</button>
</div>
<button type="button"
aria-hidden="true"
>
<svg stroke="currentColor"
fill="none"
stroke-width="2"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path stroke="none"
d="M0 0h24v24H0z"
fill="none"
>
</path>
<path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z">
</path>
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2">
</path>
</svg>
</button>
</div>
<code>
$
<span>
echo
</span>
<span>
"Hello World"
</span>
</code>
</pre>
`;
Loading

2 comments on commit cfb93f1

@vercel
Copy link

@vercel vercel bot commented on cfb93f1 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cfb93f1 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nodejs-org-stories – ./

nodejs-org-stories-git-main-openjs.vercel.app
nodejs-org-storybook.vercel.app
nodejs-org-stories-openjs.vercel.app

Please sign in to comment.