Skip to content

Instantly share code, notes, and snippets.

View grantglidewell's full-sized avatar

Grant Glidewell grantglidewell

View GitHub Profile
export class NumberFieldType extends Component {
constructor(props) {
super(props);
this.state = {
numberInput: ""
};
}
render() {
const { numberInput } = this.state;
export class UrlFieldType extends Component {
constructor(props) {
super(props)
this.state = {
textInput: ''
}
}
render() {
const { textInput } = this.state
return (
export class BinaryFieldType extends Component {
static defaultProps = {
trueValue: 'True',
falseValue: 'False'
}
state = {
binaryInput: false,
value: this.props.falseValue
export class DateFieldType extends Component {
constructor(props) {
super(props)
this.state = {
date: moment()
}
}
render() {
return (
export class DateTimeFieldType extends Component {
constructor(props) {
super(props)
this.state = {
date: moment()
}
}
render() {
return (
export class ColorFieldType extends Component {
constructor(props) {
super(props)
this.state = {
colorInput: '#ffffff'
}
}
componentDidMount() {
if (this.props.default) {
export class CurrencyFieldType extends Component {
constructor(props) {
super(props)
this.state = {
selectedCurrency: null,
amount: '$0.00',
inputAmount: ''
}
}
componentDidMount() {
export class DropDownFieldType extends Component {
state = {
selectedOption: this.props.options[0],
options: this.props.options
}
render() {
const { selectedOption } = this.state
return (
<article className={styles.CurrencyFieldType}>
<CollapsibleCard header="Collapse Me" footer="this is a footer">
<p>This is the body</p>
</CollapsibleCard>
<CollapsibleCard header="Default Collapsed" collapsed >
<h3>A whole component! look at that!</h3>
<GithubEmbed />
</CollapsibleCard>
export class CollapsibleCard extends Component {
static defaultProps = {
isCollapsed: false,
header: 'Header Required',
body: 'body required',
footer: ''
}
state = {
isCollapsed: false
}