chore(ui): tweak silence form style

This commit is contained in:
Łukasz Mierzwa
2020-06-30 17:44:15 +01:00
committed by Łukasz Mierzwa
parent f984125e40
commit b183da0215
3 changed files with 65 additions and 68 deletions

View File

@@ -2,71 +2,69 @@
exports[`<PayloadPreview /> matches snapshot 1`] = `
"
<div>
<pre class=\\"__json-pretty__\\"
style=\\"line-height:1.3;color:#66d9ef;background:#272822;overflow:auto;\\"
<pre class=\\"rounded p-1\\"
style=\\"line-height:1.3;color:#66d9ef;background:#272822;overflow:auto;\\"
>
{
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
{
matchers
</span>
&quot;: [],
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
matchers
</span>
&quot;: [],
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
startsAt
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;2000-02-01T00:00:00.000Z&quot;
</span>
,
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
startsAt
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;2000-02-01T00:00:00.000Z&quot;
</span>
,
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
endsAt
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;2000-02-01T01:00:00.000Z&quot;
</span>
,
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
endsAt
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;2000-02-01T01:00:00.000Z&quot;
</span>
,
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
createdBy
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;&quot;
</span>
,
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
createdBy
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;&quot;
</span>
,
&quot;
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
comment
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;PayloadPreview test&quot;
</span>
}
</pre>
</div>
<span class=\\"__json-key__\\"
style=\\"color:#f92672;\\"
>
comment
</span>
&quot;:
<span class=\\"__json-string__\\"
style=\\"color:#fd971f;\\"
>
&quot;PayloadPreview test&quot;
</span>
}
</pre>
"
`;

View File

@@ -10,12 +10,11 @@ import { SilenceFormStore } from "Stores/SilenceFormStore";
const PayloadPreview = ({ silenceFormStore }) => {
return useObserver(() => (
<div className="mt-3">
<JSONPretty
json={silenceFormStore.data.toAlertmanagerPayload}
theme={theme}
/>
</div>
<JSONPretty
json={silenceFormStore.data.toAlertmanagerPayload}
theme={theme}
themeClassName="rounded p-1"
/>
));
};
PayloadPreview.propTypes = {

View File

@@ -251,7 +251,7 @@ const SilenceForm = ({
</span>
</div>
{showPreview ? (
<div className="mt-3">
<div className="mt-4">
<ShareButton silenceFormStore={silenceFormStore} />
<PayloadPreview silenceFormStore={silenceFormStore} />
</div>