Mintbase Widgets
npm install mintbase-widgetsThis is a on-going project where you can load components straight from Mintbase and Near.
This is the widget to showcase your NFT Collection @ NEAR Blockchain.
- user: mandatory
- theme: optional: 'dark'
In the present moment React only working with pure React Webpack, not working with Vite.
``npm install mintbase-widgets-react`
`ts`
import { MyNftCollection } from 'mintbase-widgets-react';
`js`
- install
` npm install mintbase-widgets`
- add this code to app.tsx
`jsx
import { applyPolyfills, defineCustomElements } from 'mintbase-widgets/loader'
useLayoutEffect(() => {
applyPolyfills().then(() => {
defineCustomElements(window)
})
}, [])
`
- add to global.d.ts
`ts `
declare namespace JSX {
interface IntrinsicElements {
'my-nft-collection': { 'user': string , 'theme': string};
}
}
- use it:
`jsx`
add script tag on head:
`js`
add web component to html
`html``