-
# Consider your audience. This project is not Bootstrap, and my team has built frameworks on top of Bootstrap. The primary audience for this project is software engineers yearning to easily implement the design artifact handed to them. Yes, contributors should over-document and explain much as you need to, but you do not need to have components just work when you drop them on the page. Read on for more about limiting internal component state.
-
# Put yourself in the consuming developer mindset. "I just updated. What just broke and why?" Why does the React child component become the the DOM parent node? Write as long of a prop description comment that is needed to understand the concept. Need to sunse
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 createReactClass from 'create-react-class'; | |
import PropTypes from 'prop-types'; | |
import { storiesOf, action } from '@storybook/react'; | |
import { normalize, schema } from 'normalizr'; | |
import IconSettings from '../../icon-settings'; | |
import { TREE } from '../../../utilities/constants'; | |
import sampleNodes from '../../../utilities/sample-data/tree'; |
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
const options = { | |
'show-me': [ | |
{ id: 1, label: 'All Products', value: 'all-products' }, | |
{ id: 2, label: 'All Wackamoles', value: 'all-Wackamoles' }, | |
{ id: 3, label: 'All Products', value: 'all-products' }, | |
{ id: 4, label: 'All Wackamoles', value: 'all-Wackamoles' }, | |
{ id: 5, label: 'All Products', value: 'all-products' }, | |
{ id: 6, label: 'All Wackamoles', value: 'all-Wackamoles' }, | |
{ id: 7, label: 'All Products', value: 'all-products' }, | |
{ id: 8, label: 'All Wackamoles', value: 'all-Wackamoles' }, |
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
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */ | |
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import UtilityIcon from '~/components/utilities/utility-icon'; | |
import assign from 'lodash.assign'; |
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 { storiesOf, action } from '@kadira/storybook'; | |
import { FORMS_CHECKBOX } from '../../../utilities/constants'; | |
import Checkbox from '../../../components/forms/checkbox'; | |
import Button from '../../../components/button'; | |
const CheckboxIndeterminate = React.createClass({ | |
getInitialState () { | |
return { |
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
// DO NOT USE THIS COMPONENT IN PRODUCTION | |
import React from 'react'; | |
// Removes the need for `PropTypes`. | |
const { PropTypes } = React; | |
// The component name will be used as the `DisplayName` and exported along with | |
// the component itself. | |
export const COMPONENT = 'ComponentPlaceholder'; |
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
/* | |
* Fuel UX Utilities Repeater Static DataSource | |
* https://github.com/ExactTarget/fuelux-utilities | |
* | |
* Copyright (c) 2014 ExactTarget | |
* Licensed under the BSD New license. | |
*/ | |
// -- BEGIN UMD WRAPPER PREFACE -- |
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
if [ "$GIT_SSH_KEY" != "" ]; then | |
echo "Detected SSH key for git. Launching ssh-agent and loading key" | |
echo $GIT_SSH_KEY | base64 --decode > id_rsa | |
# launch ssh-agent, we'll use it to serve our ssh key | |
# and kill it towards the end of the buildpack's run | |
eval `ssh-agent -s` | |
# We're not supporting passphrases at this time. We could pull that in | |
# from config as well, but then we'd have to setup expect or some other | |
# terminal automation tool to feed it into ssh-add. | |
ssh-add id_rsa |
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
// originally from http://fuelux-pages.herokuapp.com/overview/overview/?&panels=1# | |
function configureColumnsDropdown(disabled) { | |
// DOM view is not rendered until loaded is triggered | |
var view = $('.repeater').attr('data-currentview'); | |
var columns = views[view].columns; | |
var $itemsHeader = $('.repeater-header'); | |
var viewClass; | |
var activeSortBy = 'name'; |
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
<snippet> | |
<!-- Snippet for https://nodejs.org/api/util.html --> | |
<!-- Put this file in `Sublime Text 3/packages/User/ then restart. --> | |
<!-- Don't forget to import `const util = require('util');` --> | |
<content><![CDATA[ | |
console.log(`[ $TM_FILEPATH:$TM_LINE_NUMBER ] ${1:$SELECTION}: `, util.inspect(${2:$SELECTION}, { showHidden: true, depth: null, colors: true }));$0 | |
]]></content> | |
<tabTrigger>util</tabTrigger> | |
<scope>text.html,source.js</scope> | |
<description>console.log(util.inspect())</description> |