You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
489 B

  1. package react;
  2. import react.ReactComponent;
  3. import react.ReactMacro.jsx;
  4. import Common;
  5. /**
  6. * A message Div
  7. */
  8. class Message extends react.ReactComponentOfProps<{message:String}>
  9. {
  10. public function new(props:Dynamic)
  11. {
  12. super(props);
  13. }
  14. override public function render(){
  15. if (props.message == null) return null;
  16. return jsx('<div className="alert alert-warning">
  17. <span className="glyphicon glyphicon glyphicon-info-sign"></span> ${props.message}
  18. </div>
  19. ');
  20. }
  21. }