Skip to content

Instantly share code, notes, and snippets.

View grantglidewell's full-sized avatar

Grant Glidewell grantglidewell

View GitHub Profile
const checkPageForText = (page, text) => {
https.get(page, resp => {
let data = ''
resp.on('data', chunk => (data += chunk))
resp.on('end', () => {
if (data.includes(text)) {
console.log(chalk.green(`${text} exists on ${page}`))
} else {
console.log(chalk.red(`${text} not found on ${page}`))
}
{
"workbench.colorCustomizations": {
"[One Dark Pro]": {
"editor.background": "#151d27",
"editor.foreground": "#efefef",
"sideBar.background": "#1c2530",
}
},
"workbench.startupEditor": "newUntitledFile",
"workbench.iconTheme": "material-icon-theme",
<CurrencyFieldType label="Title Field" default="CAD" />
<ColorFieldType label="Title Field" />
<ColorFieldType label="Default to Orange Field" default="#ff9920" />
<Nav content={content} selected={`nav/${props.location.pathname.split('/').pop()}`} />
<WithLoader condition={condition.to.render.children} height={optional} width={optional}>
<ChildComponentToRender />
</WithLoader>
<ButtonGroup>
<Button type="" text="Button1" />
<Button type="" text="Button2" />
<Button type="" text="Button3" />
</ButtonGroup>
<br />
<ButtonGroup>
<Button type="cancel" text="Cancel" />
<Button type="save" text="Save" />
</ButtonGroup>
<Button type="" text="Button" />
<Button type="save" text="Save" />
<Button type="cancel" text="Cancel" />
<Button type="warn" text="Warn" />
<Button type="alt" text="Alt" />
export class CollapsibleCard extends Component {
static defaultProps = {
isCollapsed: false,
header: 'Header Required',
body: 'body required',
footer: ''
}
state = {
isCollapsed: false
}
<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>