Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback when Egg is triggered #1

Open
el1f opened this issue Jun 23, 2018 · 8 comments · May be fixed by #2
Open

Callback when Egg is triggered #1

el1f opened this issue Jun 23, 2018 · 8 comments · May be fixed by #2
Assignees
Labels
2.0.0 Everything that belongs to version 2.0.0
Projects
Milestone

Comments

@el1f
Copy link

el1f commented Jun 23, 2018

It would be terrific to have a callback in order to customize the container easlier.

use case:
I want to hide the content of a page, replacing it with a pong board when the user inputs the correct code. Right now I can only pass the component to render so I could use a fullscreen modal to cover the content of the page but it would be even better to just set a state taht'd hide my components content while the egg is active.

It could be something like:

const EasterEgg = require('react-easter');

// ...

render() {
  return (
    <EasterEgg
        keys={/* Array of keys to type to trigger the easter egg */}
        simultaneous={/* Add this prop if keys should be pressed all together */}
        timeout={/* Duration to show your easter egg, easter egg is displayed forever if prop is not set */}
        onsuccess={/* Callback to call when the code is correctly inserted*/}
        ontimeout={/* Callback to call when the timer runs out*/}>
      {/* Your easter egg JSX goes here */}
    </EasterEgg>
  );
}
`
@el1f el1f linked a pull request Jun 23, 2018 that will close this issue
@el1f
Copy link
Author

el1f commented Oct 26, 2019

No intention on tackling this one @devlato?

@el1f
Copy link
Author

el1f commented Feb 9, 2020

It doesn't seem like the repo's actively maintained. You can use my fork as a dependency or modify it on your own in the meantime :)

@devlato
Copy link
Owner

devlato commented Feb 11, 2020

Hey guys, I didn't have time for maintaining it. Will have a look this week 👍

@el1f
Copy link
Author

el1f commented Feb 11, 2020

So glad to see you back on this one @devlato! Take your time with it ;)

@gc
Copy link

gc commented Mar 24, 2020

Just found this project and I love it, its literally the exact thing I wanted - just sharing my support! Thanks

@devlato
Copy link
Owner

devlato commented Mar 25, 2020

@gc thanks! 🙂

@Angelk90
Copy link

@devlato , @el1f :
Are there any news about it?

@devlato
Copy link
Owner

devlato commented Mar 25, 2020

@Angelk90 will push the fix by the end of week, along with some other stuff 🙂

@devlato devlato added the 2.0.0 Everything that belongs to version 2.0.0 label Apr 7, 2020
@devlato devlato self-assigned this Apr 7, 2020
@devlato devlato added this to To do in Version 2 via automation Apr 7, 2020
@devlato devlato added this to the 2.0.0 milestone Apr 7, 2020
@devlato devlato linked a pull request Apr 7, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.0 Everything that belongs to version 2.0.0
Projects
Version 2
  
To do
Development

Successfully merging a pull request may close this issue.

4 participants