JSPM

  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q55688F
  • License MIT

Popover component for real system.

Package Exports

  • @real-system/popover
  • @real-system/popover/lib/index.esm.js
  • @real-system/popover/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@real-system/popover) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@real-system/popover

Popover component for real system.

npm version

Usage

# install peer dependencies

# npm
$ npm install react react-dom @real-system/ariakit-library @real-system/animation-library @real-system/box-primitive @real-system/button @real-system/styling-library @real-system/theme-library @real-system/flex @real-system/typography @real-system/utils-library
# yarn
$ yarn add react react-dom @real-system/ariakit-library @real-system/animation-library @real-system/box-primitive @real-system/button @real-system/styling-library @real-system/theme-library @real-system/flex @real-system/typography @real-system/utils-library

# install popover

# npm
$ npm install @real-system/popover
# yarn
$ yarn add @real-system/popover

Code Example

import { Popover } from '@real-system/popover';

/** or import each component
import {
  PopoverButton,
  PopoverContainer,
  PopoverDescription,
  PopoverDismiss,
  PopoverHeading,
} from '@real-system/popover';
**/

const MyComponent = (args) => {
  return (
    <Popover.Container placement="auto">
      <Popover.Button>Open Popover</Popover.Button>
      <Popover hideCloseButton={true}>
        <Popover.Heading mb={6}>Meet Popover</Popover.Heading>
        <Popover.Description mb={8}>
          Hello there. I am a popover! Use me as a non-modal dialog to display
          additional rich content above your UI.
        </Popover.Description>
        <Popover.Dismiss variant="primary">Confirm</Popover.Dismiss>
      </Popover>
    </Popover.Container>
  );
};

export const Default = Template.bind({});