0.1.49 • Published 7 months ago

@gluestack-ui/popover v0.1.49

Weekly downloads
-
License
-
Repository
github
Last release
7 months ago

@gluestack-ui/popover

Installation

To use @gluestack-ui/popover, all you need to do is install the @gluestack-ui/popover package:

$ yarn add @gluestack-ui/popover

# or

$ npm i @gluestack-ui/popover

Usage

Popovers often provide contextual information or quick access to related actions without requiring the user to navigate to a different page or view. Here's an example how to use this package to create one:

import { createPopover } from '@gluestack-ui/popover';
import { styled } from '../styled';
import {
  Root,
  Arrow,
  Content,
  Header,
  Footer,
  Body,
  Backdrop,
  CloseButton,
} from './styled-components';

export const Popover = createPopover({
  Root,
  Arrow,
  Content,
  Header,
  Footer,
  Body,
  Backdrop,
  CloseButton,
  //@ts-ignore
  AnimatePresence: styled.Component,
});

Customizing the Popover:

Default styling of all these components can be found in the components/core/popover file. For reference, you can view the source code of the styled Popover components.

// import the styles

import {
  Root,
  Arrow,
  Content,
  Header,
  Footer,
  Body,
  Backdrop,
  CloseButton,
} from '../components/core/popover/styled-components';

// import the createPopover function
import { createPopover } from '@gluestack-ui/popover';

// Understanding the API
export const Popover = createPopover({
  Root,
  Arrow,
  Content,
  Header,
  Footer,
  Body,
  Backdrop,
  CloseButton,
});

// Using the popover component
export default () => (
  <Popover>
    <PopoverBackdrop />
    <PopoverContent>
      <PopoverHeader>
        <PopoverCloseButton />
      </PopoverHeader>
      <PopoverBody />
      <PopoverFooter />
    </PopoverContent>
  </Popover>
);

More guides on how to get started are available here

0.1.49

7 months ago

0.1.41

12 months ago

0.1.42

11 months ago

0.1.43

11 months ago

0.1.44

8 months ago

0.1.45

8 months ago

0.1.46

8 months ago

0.1.47

8 months ago

0.1.48

8 months ago

0.1.40

12 months ago

0.1.39

12 months ago

0.1.38

12 months ago

0.1.35

1 year ago

0.1.36

1 year ago

0.1.37

1 year ago

0.1.34

2 years ago

0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29-alpha.1

2 years ago

0.1.29

2 years ago

0.1.29-alpha.0

2 years ago

0.1.28

2 years ago

0.1.16-alpha.0

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.27

2 years ago

0.1.17-alpha.0

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.16

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.13

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.1.0-alpha.0

3 years ago