How to use the bs-platform/lib/js/block.js.__ function in bs-platform

To help you get started, we’ve selected a few bs-platform 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 OneGraph / onegraph-examples / spotify-app / src / User.bs.js View on Github external
/* reducer */(function (action, state) {
              if (action) {
                return /* Update */Block.__(0, [/* record */[/* isDropdownOpen */!state[/* isDropdownOpen */0]]]);
              } else {
                console.log("Clicked LogOut!!");
                return /* SideEffects */Block.__(1, [(function (_state) {
                              auth.logout("spotify").then((function (param) {
                                          return auth.isLoggedIn("spotify");
                                        })).then((function (loginStatus) {
                                        console.log(loginStatus);
                                        Curry._1(setLogInStatus, loginStatus);
                                        return Promise.resolve(/* () */0);
                                      })).catch((function (err) {
                                      return Promise.resolve((console.log(err), /* () */0));
                                    }));
                              return /* () */0;
                            })]);
              }
            }),
          /* jsElementWrapped */component[/* jsElementWrapped */13]
github phated / mxdbmobile / src / card / Character.js View on Github external
]
        ]
      ]
    ]);

var title = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.fontWeight(/* Bold */737455525),
      /* [] */0
    ]);

var cardListItem = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.height(/* Pt */Block.__(0, [170.0])),
      /* :: */[
        Style$BsReactNative.flexDirection(/* Row */0),
        /* :: */[
          Style$BsReactNative.padding(/* Pt */Block.__(0, [16.0])),
          /* [] */0
        ]
      ]
    ]);

var thumbnail = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.height(/* Pt */Block.__(0, [100.0])),
      /* :: */[
        Style$BsReactNative.width(/* Pt */Block.__(0, [72.0])),
        /* [] */0
      ]
    ]);

var stats = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.width(/* Pt */Block.__(0, [45.0])),
      /* :: */[
github phated / mxdbmobile / src / card / BattleStat.js View on Github external
}
      case 3 : 
          var match$4 = statList[0];
          switch (match$4.tag | 0) {
            case 1 : 
                var match$5 = statList[1];
                switch (match$5.tag | 0) {
                  case 0 : 
                  case 1 : 
                      return Pervasives.failwith("Invalid Battle Card stat list.");
                  case 2 : 
                      var match$6 = statList[2];
                      switch (match$6.tag | 0) {
                        case 0 : 
                            return /* StrengthIntelligenceSpecial */Block.__(6, [match$4[0]]);
                        case 1 : 
                        case 2 : 
                            return Pervasives.failwith("Invalid Battle Card stat list.");
                        
                      }
                  
                }
            case 0 : 
            case 2 : 
                return Pervasives.failwith("Invalid Battle Card stat list.");
            
          }
      
    }
  }
}
github phated / mxdbmobile / src / card / Stat.js View on Github external
}
}

function decoder(json) {
  return Json_decode.map(fromRecord, (function (json) {
                return /* record */[
                        /* type_ */Json_decode.field("type", Json_decode.string, json),
                        /* rank */Json_decode.field("rank", Json_decode.$$int, json)
                      ];
              }), json);
}

var container = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.flexDirection(/* Row */0),
      /* :: */[
        Style$BsReactNative.marginTop(/* Pt */Block.__(0, [8.0])),
        /* :: */[
          Style$BsReactNative.justifyContent(/* FlexEnd */1),
          /* :: */[
            Style$BsReactNative.alignItems(/* Center */2),
            /* :: */[
              Style$BsReactNative.width(/* Pt */Block.__(0, [45.0])),
              /* [] */0
            ]
          ]
        ]
      ]
    ]);

var rank = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.marginLeft(/* Pt */Block.__(0, [4.0])),
      /* :: */[
github phated / mxdbmobile / src / card / BattleStat.js View on Github external
/* :: */[
        Style$BsReactNative.justifyContent(/* FlexEnd */1),
        /* :: */[
          Style$BsReactNative.alignItems(/* Center */2),
          /* :: */[
            Style$BsReactNative.width(/* Pt */Block.__(0, [68.0])),
            /* [] */0
          ]
        ]
      ]
    ]);

var doubleIcon = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.position(/* Relative */1),
      /* :: */[
        Style$BsReactNative.width(/* Pt */Block.__(0, [38.5])),
        /* :: */[
          Style$BsReactNative.height(/* Pt */Block.__(0, [30.0])),
          /* [] */0
        ]
      ]
    ]);

var firstDouble = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.position(/* Absolute */0),
      /* :: */[
        Style$BsReactNative.top(/* Pt */Block.__(0, [5.0])),
        /* :: */[
          Style$BsReactNative.left(/* Pt */Block.__(0, [0.0])),
          /* :: */[
            Style$BsReactNative.zIndex(2),
            /* :: */[
github rebench / rebench.github.io / src / services / Compiler.bs.js View on Github external
function compileTest(setup, test) {
  var param = _check(test[/* language */1], test[/* code */2]);
  if (param.tag) {
    var e = param[0];
    return /* Error */Block.__(2, [
              e[/* message */0],
              /* :: */[
                toMark(e),
                /* [] */0
              ]
            ]);
  } else {
    var param$1 = Rebase.Result[/* flatMap */6](BsBox.compile, Rebase.Result[/* map */0](Rebase.Fn[/* id */0], Rebase.Result[/* map */0](Refmt.printML, Refmt.parseRE(_assemble(setup, param[0])))));
    if (param$1.tag) {
      return /* Error */Block.__(2, [
                param$1[0][1][/* message */0],
                /* [] */0
              ]);
    } else {
      var match = param$1[0];
      var warnings = match[/* warnings */1];
      var code = match[/* code */0];
      if (warnings === "") {
        return /* Ok */Block.__(0, [code]);
      } else {
        return /* Warning */Block.__(1, [
                  code,
                  warnings
                ]);
      }
    }
github OneGraph / onegraph-examples / spotify-app / src / LinkShare.bs.js View on Github external
/* reducer */(function (action, state) {
              return /* Update */Block.__(0, [/* record */[/* isDropdownOpen */!state[/* isDropdownOpen */0]]]);
            }),
          /* jsElementWrapped */component[/* jsElementWrapped */13]
github phated / mxdbmobile / src / GridOfCards.js View on Github external
];

var component = ReasonReact.reducerComponent("GridOfCards");

var container = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.flex(1),
      /* :: */[
        Style$BsReactNative.alignItems(/* Stretch */3),
        /* [] */0
      ]
    ]);

var small = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.height(/* Pt */Block.__(0, [100])),
      /* :: */[
        Style$BsReactNative.width(/* Pt */Block.__(0, [72])),
        /* [] */0
      ]
    ]);

var Styles = /* module */[
  /* container */container,
  /* small */small
];

function getUri(card) {
  var match = card.image;
  if (match) {
    return match[0].small;
  } else {
    return "";
  }
github rebench / rebench.github.io / lib / js / src / common / ffi / Refmt.js View on Github external
function _wrap(f, x) {
  try {
    return /* Ok */Block.__(0, [Curry._1(f, x)]);
  }
  catch (raw_exn){
    var exn = Js_exn.internalToOCamlException(raw_exn);
    if (exn[0] === Js_exn.$$Error) {
      return /* Error */Block.__(1, [exn[1]]);
    } else {
      throw exn;
    }
  }
}
github phated / mxdbmobile / src / card / BattleStat.js View on Github external
Style$BsReactNative.position(/* Relative */1),
      /* :: */[
        Style$BsReactNative.width(/* Pt */Block.__(0, [38.5])),
        /* :: */[
          Style$BsReactNative.height(/* Pt */Block.__(0, [30.0])),
          /* [] */0
        ]
      ]
    ]);

var firstDouble = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.position(/* Absolute */0),
      /* :: */[
        Style$BsReactNative.top(/* Pt */Block.__(0, [5.0])),
        /* :: */[
          Style$BsReactNative.left(/* Pt */Block.__(0, [0.0])),
          /* :: */[
            Style$BsReactNative.zIndex(2),
            /* :: */[
              Style$BsReactNative.borderRadius(12.0),
              /* :: */[
                Style$BsReactNative.backgroundColor(Colors$Mxdbmobile.Css[/* white */1]),
                /* [] */0
              ]
            ]
          ]
        ]
      ]
    ]);

var secondDouble = Style$BsReactNative.style(/* :: */[
      Style$BsReactNative.position(/* Absolute */0),