1.9.2 • Published 10 months ago

@igloo-ui/dropdown v1.9.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

Dropdown

Displays a sub-element overlaid and renders the content

Installation

To install @igloo-ui/dropdown in your project, you will need to run the following command using npm:

npm install @igloo-ui/dropdown

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/dropdown

Usage

Then to use the component in your code just import it!

import Dropdown from '@igloo-ui/dropdown';
import Button from '@igloo-ui/button';

const [show, setShow] = React.useState(false);

function List() {
  const listItem = items.map((item, key) => (
    <li key={`list-item_${key}`}>{item}</li>
  ));
  return <ul>{listItem}</ul>;
}

<Dropdown isOpen={show} onClose={() => setShow(false)} content={<List />}>
  <Button appearance="secondary" size="small" onClick={() => setShow(!show)}>
    Settings
  </Button>
</Dropdown>;
1.9.1

11 months ago

1.9.0

1 year ago

1.9.2

10 months ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.6

1 year ago

1.6.5

1 year ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago