mirror of
https://github.com/apache/superset.git
synced 2026-09-01 21:11:28 +00:00
style(sqllab): restore Template Parameters modal styling (#35965)
(cherry picked from commit ae63f64771)
This commit is contained in:
committed by
Joe Li
parent
00ac662977
commit
1ea68dd451
@@ -35,6 +35,14 @@ const StyledConfigEditor = styled(ConfigEditor)`
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledParagraph = styled.p`
|
||||
margin-top: 0;
|
||||
`;
|
||||
|
||||
const Code = styled.code`
|
||||
color: ${({ theme }) => theme.colorPrimary};
|
||||
`;
|
||||
|
||||
export type TemplateParamsEditorProps = {
|
||||
queryEditorId: string;
|
||||
language: 'yaml' | 'json';
|
||||
@@ -64,13 +72,11 @@ const TemplateParamsEditor = ({
|
||||
|
||||
const modalBody = (
|
||||
<div>
|
||||
<p>
|
||||
{t('Assign a set of parameters as')}
|
||||
<code>JSON</code>
|
||||
{t('below (example:')}
|
||||
<code>{'{"my_table": "foo"}'}</code>
|
||||
{t('), and they become available in your SQL (example:')}
|
||||
<code>SELECT * FROM {'{{ my_table }}'} </code>) {t('by using')}
|
||||
<StyledParagraph>
|
||||
{t('Assign a set of parameters as')} <Code>JSON</Code>{' '}
|
||||
{t('below (example:')} <Code>{'{"my_table": "foo"}'}</Code>
|
||||
{t('), and they become available in your SQL (example:')}{' '}
|
||||
<Code>SELECT * FROM {'{{ my_table }}'} </Code>) {t('by using')}
|
||||
<a
|
||||
href="https://superset.apache.org/sqllab.html#templating-with-jinja"
|
||||
target="_blank"
|
||||
@@ -79,7 +85,7 @@ const TemplateParamsEditor = ({
|
||||
{t('Jinja templating')}
|
||||
</a>{' '}
|
||||
{t('syntax.')}
|
||||
</p>
|
||||
</StyledParagraph>
|
||||
<StyledConfigEditor
|
||||
mode={language}
|
||||
minLines={25}
|
||||
|
||||
Reference in New Issue
Block a user