Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Jun 21, 2024
1 parent 9bcce12 commit d6420d2
Showing 1 changed file with 0 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,76 +334,6 @@ export function PipelineHogFunctionConfiguration({
</LemonButton>
</div>
)}

{showSource ? (
<>
<LemonButton
icon={<IconPlus />}
size="small"
type="secondary"
className="my-4"
onClick={() => {
setConfigurationValue('inputs_schema', [
...(configuration.inputs_schema ?? []),
{
type: 'string',
key: `input_${
(configuration.inputs_schema?.length ?? 0) + 1
}`,
label: '',
required: false,
},
])
}}
>
Add input variable
</LemonButton>
<LemonField name="hog">
{({ value, onChange }) => (
<>
<div className="flex justify-between gap-2">
<LemonLabel>Function source code</LemonLabel>
<LemonButton
size="xsmall"
type="secondary"
onClick={() => setShowSource(false)}
>
Hide source code
</LemonButton>
</div>
<CodeEditorResizeable
language="rust"
value={value ?? ''}
onChange={(v) => onChange(v ?? '')}
options={{
minimap: {
enabled: false,
},
wordWrap: 'on',
scrollBeyondLastLine: false,
automaticLayout: true,
fixedOverflowWidgets: true,
suggest: {
showInlineDetails: true,
},
quickSuggestionsDelay: 300,
}}
/>
</>
)}
</LemonField>
</>
) : (
<div className="flex justify-end mt-2">
<LemonButton
size="xsmall"
type="secondary"
onClick={() => setShowSource(true)}
>
Show function source code
</LemonButton>
</div>
)}
</div>
</div>

Expand Down

0 comments on commit d6420d2

Please sign in to comment.