@arnat/styled-dropdown
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

ARNT - styled-dropdown

npm Travis branch Codecov branch storybook lerna

Modular approach to use bootstrap components for quick prototypes, as an entrypoint of the component library.

Usage

import React, { useState } from 'react';

import { Button } from '@arnat/styled-button';
import { Dropdown, DropdownItem, DropdownMenu } from '@arnat/styled-dropdown';

export const SimpleDropdown = () => {
  const [hidden, setHidden] = useState(true);

  return (
    <Dropdown>
      <Button dropdownToggle onClick={() => setHidden(!hidden)}>
        Dropdown Button
      </Button>
      <DropdownMenu hidden={hidden} toggle={() => setHidden(!hidden)}>
        <DropdownItem>Action</DropdownItem>
        <DropdownItem>Another action</DropdownItem>
        <DropdownDivider />
        <DropdownItem>Action after divider</DropdownItem>
      </DropdownMenu>
    </Dropdown>
  );
};

Properties

Properties which can be added to the component to change the visual appearance.

  • active only on DropdownItem Type: boolean
  • hidden only on DropdownMenu Type: boolean
  • noRadius only on DropdownMenu Type: boolean
  • right only on DropdownMenu Type: boolean
  • fullWidth only on DropdownMenu Type: boolean
  • toggle only on DropdownMenu Type: boolean

Package Sidebar

Install

npm i @arnat/styled-dropdown

Weekly Downloads

2

Version

0.0.12

License

MIT

Unpacked Size

51.2 kB

Total Files

13

Last publish

Collaborators

  • arnat.technologies
  • rsurjano