Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
editor props
  • Loading branch information
mcasimir committed May 14, 2025
commit b0ef5b458eeed616468809e32fe729c09ce76cd0
16 changes: 16 additions & 0 deletions packages/compass-editor/src/editor.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ import { CodemirrorInlineEditor } from './editor';
<Meta
title="Components/Editor/InlineEditor"
component={CodemirrorInlineEditor}
argTypes={{
text: { control: 'text' },
language: {
control: 'select',
options: ['json', 'javascript', 'javascript-expression'],
defaultValue: 'javascript',
},
disabled: { control: 'boolean' },
readOnly: { control: 'boolean' },
placeholder: { control: 'text' },
darkMode: { control: 'boolean' },
onChangeText: { action: 'changed' },
onFocus: { action: 'focused' },
onBlur: { action: 'blurred' },
onPaste: { action: 'pasted' },
}}
/>

# Inline Editor
Expand Down
29 changes: 29 additions & 0 deletions packages/compass-editor/src/multiline-editor.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ import { CodemirrorMultilineEditor } from './editor';
<Meta
title="Components/Editor/MultilineEditor"
component={CodemirrorMultilineEditor}
argTypes={{
text: { control: 'text' },
language: {
control: 'select',
options: ['json', 'javascript', 'javascript-expression'],
defaultValue: 'javascript',
},
disabled: { control: 'boolean' },
readOnly: { control: 'boolean' },
showLineNumbers: { control: 'boolean', defaultValue: true },
showFoldGutter: { control: 'boolean', defaultValue: true },
showAnnotationsGutter: { control: 'boolean', defaultValue: true },
showScroll: { control: 'boolean', defaultValue: true },
highlightActiveLine: { control: 'boolean', defaultValue: true },
darkMode: { control: 'boolean' },
copyable: { control: 'boolean', defaultValue: true },
formattable: { control: 'boolean', defaultValue: true },
expanded: { control: 'boolean' },
minLines: { control: 'number' },
maxLines: { control: 'number' },
lineHeight: { control: 'number', defaultValue: 16 },
placeholder: { control: 'text' },
onChangeText: { action: 'changed' },
onFocus: { action: 'focused' },
onBlur: { action: 'blurred' },
onPaste: { action: 'pasted' },
onExpand: { action: 'expanded' },
onCopy: { action: 'copied' },
}}
/>

# Multiline Editor
Expand Down