mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
style(sqllab): restore Template Parameters modal styling (#35965)
This commit is contained in:
committed by
GitHub
parent
63dfd95aa2
commit
ae63f64771
@@ -36,6 +36,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';
|
||||
@@ -65,13 +73,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"
|
||||
@@ -80,7 +86,7 @@ const TemplateParamsEditor = ({
|
||||
{t('Jinja templating')}
|
||||
</a>{' '}
|
||||
{t('syntax.')}
|
||||
</p>
|
||||
</StyledParagraph>
|
||||
<StyledConfigEditor
|
||||
mode={language}
|
||||
minLines={25}
|
||||
|
||||
Reference in New Issue
Block a user