Jordan Sexton 4a7609af25 checkout select changes from mwa branch 3 年之前
..
src 91fc692963 add .js file extensions 3 年之前
LICENSE 10655364d6 move packages 4 年之前
README.md fda91e9c60 update readme / faq 3 年之前
package.json 4a7609af25 checkout select changes from mwa branch 3 年之前
styles.css f556c2e485 don't import styles into JS by default 4 年之前
tsconfig.all.json b020b317b5 update tsconfig paths 3 年之前
tsconfig.cjs.json 33af6643ac update tsconfig 3 年之前
tsconfig.esm.json 33af6643ac update tsconfig 3 年之前

README.md

@solana/wallet-adapter-ant-design

Quick Setup (using Create-React-App with craco-less)

See the example package for more usage.

Install

  1. Set up craco if you haven't already using the following guide.
  2. Add craco-less into the project npm install --save craco-less.
    1. Add it to the craco.config.js file

      const CracoLessPlugin = require('craco-less');
      module.exports = {
          plugins: [
              {
                  plugin: CracoLessPlugin,
                  options: {
                      lessLoaderOptions: {
                          lessOptions: {
                              modifyVars: { '@primary-color': '#512da8' },
                              javascriptEnabled: true,
                          },
                      },
                  },
              },
          ],
      };
      
  3. Install these peer dependencies (or skip this if you have them already):

    npm install --save \
    antd \
    @ant-design/icons \
    @solana/web3.js \
    react
    
  4. Install these dependencies:

    npm install --save \
    @solana/wallet-adapter-wallets \
    @solana/wallet-adapter-react \
    @solana/wallet-adapter-ant-design \
    @solana/wallet-adapter-base
    

Usage

Check out usage in the example package.

Overrides

You can override the following elements from the stylesheet:

.wallet-adapter-icon
.wallet-adapter-modal-menu
.wallet-adapter-modal-menu-item
.wallet-adapter-modal-menu-button
.wallet-adapter-modal-menu-button-icon
.wallet-adapter-multi-button-menu
.wallet-adapter-multi-button-menu-item
.wallet-adapter-multi-button-menu-button
.wallet-adapter-multi-button-icon
.wallet-adapter-multi-button-item