# Spindl React Embed Library

## Getting Started

- Run `npm i --save @spindl-xyz/embed-react` or `yarn add @spindl-xyz/embed-react`
- Import the `BannerEmbed` component and utilize it in your react application
  - Please reach out to us for the proper `publisherId`, `placementId`
  - For customization, you can pass in additional styles which will target the returning `iframe` tag. we recommend adding `width` and `height` to desired dimensions

### Optional Params

- `address`: optional `string | string[]` but highly encouraged to provide more targeted embeds
- `properties`: optional json blob. useful to pass in extra context for user to provide more targeted embeds

```tsx
import { BannerEmbed } from "@spindl-xyz/embed-react";

const Component = () => {
  return (
    <>
      // ...
      <BannerEmbed
        publisherId="test" // * required
        placementId="1" // * required
        style={{
          width: "970px",
          height: "250px",
        }} // * recommended to add desired width/height
        address={"0x123..."} // can also be passed in an array. i.e. ["0x123", "0x456"]
        properties={{
          userType: "nft",
        }} // optional. you can pass in JSON blob as additional context so we can provide more targeted embeds
      />
    </>
  );
};
```
