This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For full API documentation, including code examples, visit http://wix.to/94BuAAs | |
import { getJSON } from 'wix-fetch'; | |
$w.onReady(function () { | |
getJSON('https://api.myjson.com/bins/1f4ht7').then(json => { | |
const estadosList = json.data.map(i => { | |
return { label: i.nome, value: i.nome } | |
}); | |
$w('#dropdown1').options = estadosList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -------------------------------------------------------------------------- */ | |
// All Bootstrap 4 Sass Mixins [Cheat sheet] | |
// Updated to Bootstrap v4.1.x | |
// @author https://anschaef.de | |
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins | |
/* -------------------------------------------------------------------------- */ | |
// Grid variables | |
$grid-columns: 12 !default; | |
$grid-gutter-width: 30px !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import { rangeCustomersBy } from '../actions/filter.actions'; | |
class MainFilterCont extends Component { | |
// code | |
} | |
const mapDispatchToProps = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import someAPI from '../services/someAPI'; | |
export const GET_CUSTOMER = 'GET_CUSTOMER'; | |
export const getCustomer = customerId => ({ | |
type: GET_CUSTOMERS, | |
payload: someAPI.get(`customers/${customerId}`) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import MainFilterCont from '../containers/MainFilter.container'; | |
import Header from '../components/Header'; | |
class HomePage extends Component { | |
render() { | |
return ( | |
<section className="home-page"> | |
<div className="nice-classname"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import SomeComponent from '../components/SomeComponent'; | |
class HomePage extends Component { | |
render() { | |
return ( | |
<section className="home-page"> | |
<div className="nice-classname"> | |
<h1>Macgyver</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Switch, Route, Redirect } from 'react-router-dom' | |
import Header from '../componets/Header' | |
import HomePage from '../pages/HomePage' | |
import UsersPage from '../pages/UsersPage' | |
import ProductsPage from '../pages/ProductsPage' | |
const PrimaryLayout = ({ match }) => ( | |
<div className="primary-layout"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParameterByName(name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) return null; | |
if (!results[2]) return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Trigger/Open The Modal --> | |
<button id="myBtn">Open Modal</button> | |
<!-- The Modal --> | |
<div id="myModal" class="modal"> | |
<!-- Modal content --> | |
<div class="modal-content"> | |
<span class="close">×</span> | |
<p>Some text in the Modal..</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.16; | |
contract MyToken { | |
/* This creates an array with all balances */ | |
mapping (address => uint256) public balanceOf; | |
/* Initializes contract with initial supply tokens to the creator of the contract */ | |
function MyToken( | |
uint256 initialSupply | |
) public { |
NewerOlder