New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

mirrorblocks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mirrorblocks

Mirror.xyz components to render web3 blocks

latest
npmnpm
Version
0.0.16
Version published
Weekly downloads
8
700%
Maintainers
1
Weekly downloads
 
Created
Source

Styled components for Mirror.xyz

Building blocks for Mirror.xyz to render web3 content in your React app. Styled with Mirror Degen.

Renders:

  • Entries
  • Crowdfunds
  • Editions
  • Entry editions
  • Polls
  • ... more to come

Usage

  • Install mirrorblocks
npm install mirrorblocks 
yarn add mirrorblocks 
  • Wrap your app with the ThemeProvider. It works for Mirror Degen too.
import { ThemeProvider } from 'mirrorblocks'

const App = () => (
    <ThemeProvider>
        <YourRoutes />
    </ThemeProvider>
)
  • Import the components you want to use
import { Crowdfund, Entry, Edition, EntryEdition, Poll } from 'mirrorblocks'

const MyPage = () => (
    <main>
        <Poll digest={'U91KFBfSmWCjJar4-tflQBSQK1H0IVTOMheSPrHvU0Q'} id={"18"} />
        <Crowdfund maxWidth={"64"} address={"0x18f623e397EF28F1A5a094840f7F6f5587828b94"} />
        <Edition contract={'0xDF5b5ee15CC96ba7d0CB6BD9b2c0fc4417ab6445'} id={453} maxWidth={{ xs: 'full', md: 'full', lg: '96' }}/> //supports media queries
        <EntryEdition digest={"sfgXhqtwwMkhHLnAM1jVr16MdSJ4RGSb1Y6CAKpslgc"} />
    </main>
)

export default MyPage

License

MIT.

If you have any optimizations ideas or improvements feel free to contribute :)

FAQs

Package last updated on 03 Feb 2022

Related posts