Skip to content

Instantly share code, notes, and snippets.

View at0g's full-sized avatar

Ben Daley at0g

  • Australia
  • Melbourne
View GitHub Profile
@at0g
at0g / autoform-datepicker-range.html
Last active February 1, 2016 13:16
An example of using aldeen:autoform with dual date pickers. There is custom validation where the endDate must be between 3 days and 3 weeks from the start date.
<head>
<title>Datepicker range example</title>
</head>
<body>
<h1>Welcome to Meteor!</h1>
<div class="container">
{{> thingsForm }}
</div>
@at0g
at0g / component-no-children.jsx
Created May 8, 2015 06:12
react components with rest/spread props
'use strict';
var React = require('react');
var ComponentNoChildren = React.createClass({
getDefaultProps: function () {
return {
Component: 'div',
className: 'component-no-children'
}
},
@at0g
at0g / with-spread.jsx
Created May 8, 2015 07:47
react with spread vs without spread
'use strict';
var React = require('react');
var Component = React.createComponent({
getDefaultProps: function () {
return {
Component: 'div',
foo: 'foo',
bar: 'bar',
@at0g
at0g / FelaComponent.js
Last active August 25, 2018 09:25
Typing Fela
// @flow
// file: src/FelaComponent.js
import * as React from 'react'
import { createComponent } from 'react-fela'
// Our basic component props, without any fela guff.
type PropsType = {