Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Protofy-xyz/Protofy
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarlosn committed Nov 18, 2024
2 parents a0c9c26 + da66045 commit 9cc401d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions packages/visualui/src/components/ContentEditable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Editable from 'react-contenteditable';

export const ContentEditable = ({ children, editable = false, onChange = e => {}, ...props }: any) => {
return <>
{editable ?
<Editable
style={{ border: '2px dashed var(--blue8)' }}
html={children}
onChange={onChange}
{...props}
/>
: children
}
</>
};
3 changes: 2 additions & 1 deletion packages/visualui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import App from "./App";

export default App;
export { newVisualUiContext, useVisualUi, useVisualUiAtom, useVisualUiComms } from "./visualUiHooks"
export { newVisualUiContext, useVisualUi, useVisualUiAtom, useVisualUiComms } from "./visualUiHooks"
export * from "./components/ContentEditable"

0 comments on commit 9cc401d

Please sign in to comment.