@pras-ui/shared-ui

v0.0.1

Published

> A collection of shared, low-level UI components used across the `@pras-ui`.

Downloads

5

Readme

@pras-ui/shared-ui

A collection of shared, low-level UI components used across the @pras-ui.

This package contains common components that are used as building blocks in other @pras-ui packages.

Installation

npm install @pras-ui/shared-ui

Components

Portal

Renders its children into a new React Portal, mounting them at the end of document.body by default. This is useful for components like modals and popups that need to appear on top of all other UI.

import { Portal } from "@pras-ui/shared-ui";

function MyModal() {
  return (
    <Portal>
      <div className="modal">My Modal Content</div>
    </Portal>
  );
}

Trigger

A simple, unstyled button component with some basic configurations that acts as a base for more complex trigger components in the library.

import { Trigger } from "@pras-ui/shared-ui";

function MyButton() {
  return <Trigger onClick={() => alert("Clicked!")}>Click Me</Trigger>;
}