Skip to content

Instantly share code, notes, and snippets.

View tonymamo's full-sized avatar
🏔️

Tony Mamo tonymamo

🏔️
View GitHub Profile
@tonymamo
tonymamo / dropdown.jsx
Last active February 24, 2022 19:01
Technical exercise
/*
Prompt:
We have defined a basic dropdown via the Dropdown and DropdownItem components below, with example usage
in the ExampleNav component. The Dropdown and DropdownItem components have some problems, and also
have room for improvements (doesn't everything?) A couple items TODO here (make sure to explain with comments!)
0. How are you today? 😊
- doing great!
1. Please fix any obvious issues you see with the dropdown and then save your gist.
{
"FSA Type Creator Name": {
"scope": "javascript,typescript",
"prefix": "fsa",
"body": [
"export const ${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_REQUEST = '${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_REQUEST';",
"export const ${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_SUCCESS = '${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_SUCCESS';",
"export const ${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_FAILURE = '${1/([a-z]*)(([A-Z])+([a-z]+))?/${1:/upcase}${2:+_}$3${4:/upcase}/g}_FAILURE';",
"",
"export const ${1} = (payload: ${2}) => ({",

Keybase proof

I hereby claim:

  • I am tonymamo on github.
  • I am tonymamo (https://keybase.io/tonymamo) on keybase.
  • I have a public key ASCVhW5xO2r7gN0PVl63q9N_UMStMPYh-UcC2ErP12ly9go

To claim this, I am signing this object:

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->