ok2ju / teleport-components

Collection of React portal based components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Teleport components

Collection of React portal based components

This is raw doc (mostly garbage).

TODO's:

  • add linter: doc
  • Add Readme
  • Add Dropdown component
  • Add Tooltip component
  • Add Popover component
  • Add Modal component
  • Automatically update gh-pages

Commands

Add dependency to specific package:

lerna add react packages/portal --peer

Add dependency to root of monorepo:

yarn add prettier --dev -W

Linting

typescript-lint (useful links):

To setup your editor to automatically run ESLint's automatic fix command (i.e. eslint --fix) whenever a file is saved set following option in settings.json in VSCode:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
}

Project uses husky and lint-staged to lint code before commit

Docs

Docs have written using nextjs.

We use aliases to packages using tsconfig.json paths property:

// docs/tsconfig.json
{
  "compilerOptions": {
    "baseUrl": "../",
    "paths": {
      "@teleport/*": [
        "packages/*/src"
      ]
    }
  },
}

It allows us to write imports in following format:

import { usePortal } from '@teleport/portal'

About

Collection of React portal based components

License:MIT License


Languages

Language:TypeScript 79.6%Language:JavaScript 20.4%