Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
52 lines (40 loc) · 1.04 KB

dropdown_button.md

File metadata and controls

52 lines (40 loc) · 1.04 KB

Buttons/DropdownButton

Renders a button with a drop down icon and popper.

DropdownButton example

<DropdownButton type="primary" size="large">
    Primary large
    <ButtonPopper>
        Hello!
    </ButtonPopper>
</DropdownButton>

Props

size={string}
One of "large", "medium", or "small".

type={string}
One of "primary", "secondary", or "cta".

disabled={bool}
Whether or not the button is disabled or not.

onClick={func}
Called when the button is clicked.

CSS

Adds dp-dropdown-button to the root element.

Examples

import React from 'react';
import { render } from 'react-dom';
import { DropdownButton, ButtonPopper } from 'Components/Buttons';

const App = () => (
    <div>
        <DropdownButton type="primary" size="large">
            Click Me
            <ButtonPopper>
                I am popper.
            </ButtonPopper>
        </DropdownButton>
    </div>
);

render(<App />, document.getElementById('mount'));