JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q57788F
  • License MIT

The bootstrap dropdown component created with styled-components

Package Exports

  • @arnat/styled-dropdown

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 (@arnat/styled-dropdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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