This file contains hidden or 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 './App.css'; | |
const cards = ['Card 1', 'Card 2', 'Card 3']; | |
const Card = props => ( | |
<div | |
onClick={props.handleClick} | |
className="Card" | |
style={{transform: props.selected && 'scale(1.5)'}}> |
This file contains hidden or 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
class BoundsLayer extends Layer | |
constructor: (props) -> | |
super props | |
@_origin = @convertPointToScreen({x: 0, y: 0}) | |
@background = new Layer | |
parent: @ | |
size: Screen.size | |
x: -@_origin.x |
This file contains hidden or 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
{ yoga } = require "npm" | |
root = yoga.Node.create() | |
root.setWidth(Screen.width) | |
root.setHeight(Screen.height) | |
root.setPadding(yoga.EDGE_ALL, 20) | |
root.setDisplay(yoga.DISPLAY_FLEX) | |
root.setFlexDirection(yoga.FLEX_DIRECTION_ROW) | |
childA = new Layer |
This file contains hidden or 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
{ yoga } = require "npm" | |
# Establish a root node | |
root = yoga.Node.create() | |
root.setWidth(Screen.width) | |
root.setHeight(Screen.height) | |
root.setPadding(yoga.EDGE_ALL, 20) | |
root.setDisplay(yoga.DISPLAY_FLEX) | |
root.setFlexDirection(yoga.FLEX_DIRECTION_ROW) |
This file contains hidden or 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
class Router extends FlowComponent | |
constructor: (props) -> | |
@_props = props || {} | |
super _.defaults props, | |
name: 'Provider' | |
@define 'current', | |
get: -> @_props.current | |
set: (current) -> |
This file contains hidden or 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
EE = new Framer.EventEmitter | |
box = new Layer | |
x: Align.center | |
y: Align.center | |
backgroundColor: 'blue' | |
EE.on box, (update) -> | |
box.props = update | |
This file contains hidden or 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
{ color } = require 'fk-color' | |
Framer.Device.customize | |
screenWidth: 1439 | |
screenHeight: 1023 | |
Framer.Defaults.Animation = | |
curve: 'spring(600, 40, 0)' | |
Canvas.backgroundColor = color 'light30' |
This file contains hidden or 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
colors = [ | |
'red' | |
'blue' | |
'yellow' | |
] | |
checks = [] | |
samples = [] | |
for color, i in colors |
This file contains hidden or 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
c = | |
background: '#f0f0f0' | |
foreground: 'blue' | |
start: 10 | |
end: 90 | |
strokeWidth: 10 | |
speed: 50 | |
size: 100 | |
circle = new Layer |
This file contains hidden or 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
InputModule = require 'input' | |
# Data | |
p = | |
fontSize: 24 | |
lineHeight: 36 | |
bubbleColor: | |
left: '#4080FF' | |
right: '#ccc' | |
padding: 20 |
NewerOlder