Skip to content

Instantly share code, notes, and snippets.

@jsmanifest
Created June 9, 2020 14:57
Show Gist options
  • Save jsmanifest/6cb74ce67aac594b08f5cb7522fcd9ba to your computer and use it in GitHub Desktop.
Save jsmanifest/6cb74ce67aac594b08f5cb7522fcd9ba to your computer and use it in GitHub Desktop.
function start(component) {
// Restrict it from displaying in a smaller size
if (component.style.height < 300) {
component.style['height'] = 300
}
if (component.type === 'button') {
// Give all button components a dashed teal border
component.style['border'] = '1px dashed teal'
}
if (component.type === 'input') {
if (component.inputType === 'email') {
// Uppercase every letter for email inputs
component.style.textTransform = 'uppercase'
}
}
return component
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment