@react95/clippy

Our old good friend Clippy as a React Hook!

Usage no npm install needed!

<script type="module">
  import react95Clippy from 'https://cdn.skypack.dev/@react95/clippy';
</script>

README

Clippy agent

@react95/clippy

Using Clippy and its friends in your React Application it has never been easier!

Instalation

yarn add @react95/clippy

Usage

import { useClippy, ClippyProvider } from '@react95/clippy';

const MyComponent = () => {
  const { clippy } = useClippy();

  return <Button onClick={() => clippy.play('Wave')}>Hello Clippy!</Button>;
};

const App = () => (
  <ClippyProvider>
    <MyComponent />
  </ClippyProvider>
);

Changing the Agent

import { AGENTS } from '@react95/clippy';

const App = () => (
  <ClippyProvider agentName={AGENTS.MERLIN}>
    <MyComponent />
  </ClippyProvider>
);

API and Special thanks

This package only exposes the brilliant job done in clippyjs project, which you can find all details you'll need.