Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge shellbox into codebox #5425

Merged
merged 10 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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