-
Notifications
You must be signed in to change notification settings - Fork 22
feat: yaml tab in editor (read-only) #449
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
Conversation
|
Preview is ready. |
|
|
||
| export const YamlEditor = ({content}: YamlEditorProps) => ( | ||
| <MonacoEditor | ||
| value={yaml.dump(content)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useMemo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, done
| <MonacoEditor | ||
| value={yaml.dump(content)} | ||
| language="yaml" | ||
| options={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably for options too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also wrapped with useMemo
|
Also added copy button |
| @@ -0,0 +1,42 @@ | |||
| import React, {useState} from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use ClipboardButton from uikit instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we could. Should look for it first
No description provided.