0.0.14 • Published 4 months ago

@tomo-wallet/uikit v0.0.14

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

@tomo-wallet/uikit

A shared UI utilities package for Tomo Wallet, providing common components and theme configurations.

Features

  • 🎨 Unified theme configuration
  • 🧩 Common UI components
  • 🎭 Shared styles and layouts
  • 🛠️ UI utility functions
  • 📦 Third-party UI library extensions

Installation

pnpm add @tomo-wallet/uikit

Usage

Theme Configuration

import { ThemeProvider, defaultTheme } from "@tomo-wallet/uikit";

function App() {
  return (
    <ThemeProvider theme={defaultTheme}>
      <YourApp />
    </ThemeProvider>
  );
}

Common Components

import { Card, Modal, Toast, Loading } from "@tomo-wallet/uikit";

function YourComponent() {
  return (
    <Card>
      <Loading />
      <Toast message="Operation successful" />
    </Card>
  );
}

Layout Components

import { Container, Row, Column, Spacer } from "@tomo-wallet/uikit/layout";

function Layout() {
  return (
    <Container>
      <Row>
        <Column>Content</Column>
        <Spacer size={16} />
        <Column>More Content</Column>
      </Row>
    </Container>
  );
}

Package Structure

src/
  ├── components/        # Common UI components
  │   ├── base/         # Basic components
  │   ├── layout/       # Layout components
  │   └── feedback/     # Feedback components
  ├── theme/            # Theme configurations
  ├── styles/           # Shared styles
  └── utils/            # UI utility functions

Main Exports

Base Components

  • Button
  • Card
  • Modal
  • Tooltip
  • Dropdown

Layout Components

  • Container
  • Row
  • Column
  • Spacer
  • Divider

Feedback Components

  • Toast
  • Loading
  • ErrorBoundary
  • Skeleton

Theme

  • ThemeProvider
  • defaultTheme
  • darkTheme
  • createCustomTheme

Utils

  • getThemeColor
  • getSpacing
  • mediaQuery
  • styleHelpers

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build package
pnpm build

# Run storybook
pnpm storybook

Contributing

  1. Create feature branch
  2. Make changes
  3. Add tests
  4. Submit PR

License

MIT © Tomo Inc.

0.0.13

4 months ago

0.0.14

4 months ago

0.0.12

5 months ago

0.0.11

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.5-beta

6 months ago

0.0.5

6 months ago

0.0.7

5 months ago

0.0.6

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago