Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blockchain-com/constellation

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockchain-com/constellation

  • 0.0.29
  • npm
  • Socket score

Version published
Weekly downloads
106
decreased by-47%
Maintainers
3
Weekly downloads
 
Created
Source

Constellation

Base component library for React based applications built and used by Blockchain.com.

Using the Library

  1. Install the library yarn add @blockchain/constellation

  2. Import Inter font. see

  3. Import and wrap your entire App with the ThemeProvider component. Example below

     import { useEffect } from 'react'
    
     import {
       ThemeProvider,
       useThemeMode,
       useLocalStorage,
       ThemeMode,
       ColorMode,
     } from '@blockchain/constellation'
    
     function App(): JSX.Element {
       const [themeMode] = useLocalStorage<ThemeMode>("themeMode", 'light')
    
       const theme = useThemeMode(themeMode);
    
       return (
         <Store>
           <ThemeProvider theme={theme}>
               <Router>
                   ...
               </Router>
           </ThemeProvider>
         <Store />
       )
     }
    
  4. That's it, happy hacking!

Local Hacking Guide

If you would like to develop this library while consuming it via another application, follow these steps:

Prerequisites

  • Requires Yarn 2 (Berry) and Webpack 5. It may be possible to use in other setups, but they remain untested.**
  • Ensure the Webpack 5 config has symlinks: false in the resolve config.

Steps

  1. From Constellation repo, run yarn workspace @blockchain-com/constellation build to compile Constellation.

  2. In the app you would like to symlink the repo to, change the dependency install in package.json

    "@blockchain-com/constellation": "portal:../constellation/packages/constellation", // relative path may be different!
    
  3. In consuming app, run yarn install

  4. You can now make changes to Constellation components and use them directly in the consuming app!

NOTE: For now you will have to manually rebuild (rerun step 1) after every change to a Constellation component.

FAQs

Package last updated on 21 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc