Skip to content

Instantly share code, notes, and snippets.

@brunosabot
Created November 11, 2021 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunosabot/4ba4b450f769a15e52c5b3de3a078451 to your computer and use it in GitHub Desktop.
Save brunosabot/4ba4b450f769a15e52c5b3de3a078451 to your computer and use it in GitHub Desktop.
import React, { useState } from "react";
import ModalAnimated from "../components/modal/ModalAnimated";
interface Props {
[key: string]: never;
}
const PopinUsageSample: React.FC<Props> = () => {
const [active, setActive] = useState(false);
return (
<>
<ModalAnimated active={active} onClose={() => setActive(false)}>
Hello, world!
</ModalAnimated>
<button onClick={() => setActive(true)}>Open a popin</button>
</>
);
};
export default PopinUsageSample;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment