@arnat/styled-dropdown
v0.0.12
Published
The bootstrap dropdown component created with styled-components
Downloads
20
Readme
ARNT - styled-dropdown
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: booleanhidden
only on DropdownMenu Type: booleannoRadius
only on DropdownMenu Type: booleanright
only on DropdownMenu Type: booleanfullWidth
only on DropdownMenu Type: booleantoggle
only on DropdownMenu Type: boolean