Skip to content

Disabled support #164

Description

@antun

This is a feature request for a disabled flag on <LiveProvider> like react-live has (doc).

The goal is to allow someone to make the editor read-only:

const isEnabled = someLogicThatChecksIfEditorShouldBeEditable;

return (
 <LiveProvider code={code} scope={scope} disabled={isEnabled}>
    <LivePreview style={{ padding: '10px' }} />
    <LiveEditor style={{ minHeight: '100%', fontFamily: 'monospace' }}
    <LiveError />
  </LiveProvider>
);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions