| import {Component, Input, ViewChild, ViewContainerRef, ComponentResolver, OnInit} from '@angular/core'; | |
| import {FORM_DIRECTIVES, FormBuilder} from '@angular/common'; | |
| import {FORMSY_BS_DIRECTIVES} from 'ng2-formsy'; | |
| import {BasicForm} from './basic.form'; | |
| @Component({ | |
| selector: 'basic-form-mux', | |
| template: '<template #muxContent></template>', | |
| }) | |
| export class BasicFormMux implements OnInit { |
| /** | |
| * Material UI multi select | |
| * | |
| * Use with: | |
| * <MultiSelect fullWidth={true} value={this.state.values} onChange={(e,v) => this.setState({values: v})}> | |
| * <ListItem primaryText={"Option 1"} value={1} /> | |
| * <ListItem primaryText={"Option 2"} value={2} /> | |
| * <ListItem primaryText={"Option 3"} value={3} /> | |
| * <ListItem primaryText={"Option 4"} value={4} /> | |
| * </MultiSelect> |
| // Text inputs | |
| input:not([type]), | |
| input[type=text], | |
| input[type=password], | |
| input[type=email], | |
| input[type=url], | |
| input[type=time], | |
| input[type=date], | |
| input[type=datetime-local], | |
| input[type=tel], |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
| import React from 'react' | |
| import { withRouter, Link } from 'react-router-dom' | |
| import { graphql, compose } from 'react-apollo' | |
| import { Formik } from 'formik' | |
| import Yup from 'yup' | |
| import FormWideError from '../elements/form/FormWideError' | |
| import TextInput from '../elements/form/TextInput' | |
| import Button from '../elements/form/Button' | |
| import { H2 } from '../elements/text/Headings' |
| import { Component } from "react"; | |
| import { print } from "graphql-tag/printer"; | |
| import { graphql } from "react-apollo"; | |
| import { MockedProvider } from "react-apollo/test-utils"; | |
| import { addTypenameToDocument } from "apollo-client/queries/queryTransform"; | |
| import { mount } from "enzyme"; | |
| import { withSavedPayments, SAVED_ACCTS_QUERY } from "../"; |
| declare namespace NodeJS { | |
| export interface Global { | |
| setupTestBed: any; | |
| } | |
| } | |
| declare var setupTestBed: any; |