@source-protocol-cosmos/sourceblocks
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

sourceblocks

Sourceswap verse UI library

NPM JavaScript Style Guide

Install

yarn add sourceblocks

Usage

import React, { Component } from 'react'
import { Button, Text, styled } from 'sourceblocks'

const StyledText = styled(Text, {
  textTransform: 'uppercase',
  // Access internal theme variables using tokens
  padding: '$2 0',
  // read more https://stitches.dev/docs/tokens
  color: '$textColor$success'
})

const Example = () => {
  return (
    <>
      <StyledText variant='hero'>Welcome to sourceblocks!</StyledText>
      <Button
        variant='primary'
        onClick={() => require('source').navigateToTheMoon()}
        css={{ marginTop: '$12' }}
      >
        Join our team here
      </Button>
    </>
  )
}

Storybook

Build sourceblocks locally and preview documented components using storybook.

yarn storybook

Dev mode

This application can be used in dev mode under the yarn link strategy.

For this you can run the following script, this will create a link to your application.

  yarn run link:app --path <path of your app>

Now you can start to code with dev mode

  yarn run dev

The changes you make to this code should be refresh in your application.

For more information visit this link https://classic.yarnpkg.com/en/docs/cli/link

When you finish run the following script to unlink packages

 yarn run unlink:app --path <path of your app>

Contributing

Please submit your suggestions, feature requests or bugs reports to the GitHub Issues.

License

MIT © Source-Protocol-Cosmos

Readme

Keywords

none

Package Sidebar

Install

npm i @source-protocol-cosmos/sourceblocks

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

588 kB

Total Files

276

Last publish

Collaborators

  • nicomendiatd
  • nogaz89
  • jm.aragonpaz
  • lucas-marc
  • source-protocol