How to use the metal-jsx.Config.number 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 / App.js View on Github external
);
  }
}

App.PROPS = {
  highlightDOM: Config.func(),
  inspectDOM: Config.func(),
  onComponentExpand: Config.func(),
  onSelectedChange: Config.func(),
  port: Config.any(),
  setStateFn: Config.func(),
  theme: Config.oneOf(['dark', 'light']).value('light')
};

App.STATE = {
  firstColumnWidth: Config.number(),
  freezeUpdates: Config.value(false),
  rootComponents: Config.value({}),
  selectedComponent: Config.value({})
};

export default App;
github metal / metal-devtools / frontend / components / TreeNode.js View on Github external
class={`node-wrapper ${highlighted}`}
            onClick={this.focusNode}
            onMouseEnter={this.addHighlight}
            onMouseLeave={this.removeHighlight}
            style={style}
          >
            
          }
      
    );
  }
}

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 / src / jsx / AppJSX.js View on Github external
{`Child #${this.props.index}:`}

				<button>{'+'}</button>

				{this.state.subTree &amp;&amp;
					<div>
						
					</div>
				}
			
		);
	}
}

Child.PROPS = {
	index: Config.number()
};

Child.STATE = {
	subTree: Config.bool().value(false)
};

window.jsxApp = App;

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