1.31.2 • Published 8 months ago

@leather.io/ui v1.31.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

UI

This package contains Leather Wallet's UI library for our web + React Native applications.

Architecture

This package colocates Web and React Native code, such that commonalities such as shared logic and types are shared. The naming convention must be followed.

  • *.web.ts — bundled only for Web
  • *.native.ts — bundled only for React Native
  • *.shared.ts — bundled for all platforms

Web Setup

Our web apps use panda css. To setup in your application you need to:

  • Install @pandacss/dev
  • Setup panda css and configure it to acknowledge the library code
  • Configure Webpack to load the files correctly
  • Import the library styles from @leather.io/ui/styles

Panda configuration

Specify the library as part of the panda.config include:

  include: [
    './node_modules/@leather.io/ui/dist-web/**/*.{js,jsx,ts,tsx}',
    './src/**/*.{js,jsx,ts,tsx}',
  ],

Webpack configuration

  • Alias react and react-dom to avoid react errors.

  • Configure your module to handle jsx files

export const config = {
...
  module: {
    resolve: {
    ...
    alias: {
    'leather-styles': path.resolve('leather-styles'),
    'react': path.resolve('./node_modules/react'),
    'react-dom': path.resolve('./node_modules/react-dom')
    },
      ...
    rules: [
      ...
      {
        test: /\.(js)$/,
        include: [/node_modules\/@leather.io\/ui/],
        loader: 'esbuild-loader',
        options: { tsconfig: './tsconfig.json', loader: {'jsx'},target: 'es2020' },
      },

License

MIT © Leather Wallet LLC


⬅ Back


1.31.2

8 months ago

1.31.1

8 months ago

1.31.0

9 months ago

1.29.0

9 months ago

1.29.1

9 months ago

1.30.0

9 months ago

1.25.0

10 months ago

1.24.1

10 months ago

1.26.0

9 months ago

1.25.1

9 months ago

1.24.0

10 months ago

1.23.1

10 months ago

1.27.0

9 months ago

1.28.0

9 months ago

1.27.1

9 months ago

1.23.0

10 months ago

1.22.0

10 months ago

1.21.1

10 months ago

1.21.0

10 months ago

1.20.0

10 months ago

1.19.0

10 months ago

1.18.0

10 months ago

1.17.2

10 months ago

1.17.1

10 months ago

1.17.0

10 months ago

1.16.0

11 months ago

1.15.0

11 months ago

1.14.3

11 months ago

1.14.2

11 months ago

1.14.1

11 months ago

1.14.0

11 months ago

1.13.1

11 months ago

1.13.0

11 months ago

1.12.0

11 months ago

1.11.0

11 months ago

1.10.1

11 months ago

1.10.0

11 months ago

1.9.2

12 months ago

1.9.1

12 months ago

1.9.0

12 months ago

1.8.1

12 months ago

1.8.0

12 months ago

1.7.0

12 months ago

1.6.5

12 months ago

1.6.4

12 months ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago