How to use the metal-jsx.Config.string function in metal-jsx

To help you get started, we’ve selected a few metal-jsx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github metal / metal-devtools / frontend / components / TreeNode.js View on Github external
>
            
          }
      
    );
  }
}

TreeNode.PROPS = {
  componentNode: Config.value({}),
  depth: Config.number().value(0),
  highlightDOM: Config.func(),
  onInspectDOM: Config.func(),
  onNodeExpand: Config.func(),
  onNodeSelect: Config.func(),
  selectedId: Config.string()
};

TreeNode.STATE = {
  highlight: Config.value(false),
  showMenu: Config.value(false)
};

export default TreeNode;
github metal / metal-devtools / frontend / components / NodeName.js View on Github external
const {name, type} = this.props;

    return (
      <span class="node-name-container">
        {type === NORMAL_CLOSING ? '{name}</span>

        {type === SELF_CLOSING ? ' /&gt;' : '&gt;'}
      
    );
  }
}

NodeName.PROPS = {
  name: Config.string(),
  type: Config.oneOf([OPENING, NORMAL_CLOSING, SELF_CLOSING]).value(OPENING)
};

export default NodeName;
github metal / metal-devtools / frontend / components / JSONEditor.js View on Github external
return (
      
    );
  }
}

MetalJSONEditor.PROPS = {
  config: Config.object(),
  onChange: Config.func(),
  type: Config.string(),
  typeColors: Config.object(),
  value: Config.object()
};

export default MetalJSONEditor;

metal-jsx

A JSX templates renderer to be used with Metal.js's Component class

BSD
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis