View form.jsx
<app.Form fields={[
{
type: 'fieldset',
id: 'loginDetails',
legend: {
title: 'Login Details',
className: 'foo'
},
fields: [
{
View signup.js
<app.Form fields={[
{
type: 'fieldset',
id: 'loginDetails',
legend: 'Login Details',
fields: [
{
type: 'text',
label: 'Username',
id: 'username',
View module.sass
// input
@include module('alert', (
component('icon'): (
margin-right: 0.5em,
line-height: 1.25,
modifier('close'): (
cursor: pointer
),
// same as above
View get-param.scss
/// Get parmater from config string
///
/// @author [@esr360](http://twitter.com/esr360)
/// @access public
///
/// @param {string} $string - the string from which to retrieve param
@function get-param($string) {
@if str-index($string, 'component("') == 1 {
$string: str-replace($string, 'component("', '');
$string: str-replace($string, '")', '');
View alert.jsx
import defaults from './alert.json';
/**
* Render Alert component
*
* @prop {String} name
* @prop {String} alert
* @prop {Bool} bar
* @prop {Bool} box
* @prop {(Bool|Array} icon
View thing3.jsx
<Alert success bar withWrapper />
<Alert success bar withWrapper />
<Alert success bar />
//
<Alert wrapper>
<Alert success bar />
<Alert success bar />
</Alert>
View sweet.html
<Wrapper>
<Button>Button</Button>
</Wrapper>
<Wrapper>
<Alert bar success>Alert Bar</Alert>
</Wrapper>
// Output:
View alert.jsx
/*
* USAGE:
* <Alert modifiers={['jizz']} alert='success' icon={['times', 'right']}>Alert Bar 2</Alert>
*
* Output:
* <div class="alert-jizz-bar-success"><div class="alert_icon-right fa fa-times"></div>Alert Bar 2</div>
*/
import defaults from './alert-bar.json';
View webpack.config.js
import path from 'path';
import webpack from 'webpack';
export default function(env) {
const target = env.target || 'node';
const entry = (target === 'node') ? {'synergy': './src/index.js'} : {
'synergy.web': './src/js/synergy.js',
'synergy.web.min': './src/js/synergy.js',
View preference.js
if (staticBuild) {
plugins.push(StaticSiteGenerator);
} else {
plugins.push(
new HtmlWebpackPlugin({
template: 'src/views/layouts/foo.jsx',
inject: false
})
)
}