bloomer icon indicating copy to clipboard operation
bloomer copied to clipboard

Dropdown is not working

Open matheusgrieger opened this issue 6 years ago • 6 comments

I've followed the docs on implementing a Dropdown, but it is not appearing when I click the trigger. Below is the code I'm using for that:

<Column>
  <Dropdown isAlign="right" isPulled="right">
    <DropdownTrigger>
      <Button isColor="primary">
        <span>Button label</span>
        <span className="icon">
          <FontAwesomeIcon icon={['fal', 'chevron-circle-down']} />
        </span>
      </Button>
    </DropdownTrigger>
    <DropdownMenu>
      <DropdownContent>
        <DropdownItem tag="a">
          Menu item
        </DropdownItem>
      </DropdownContent>
    </DropdownMenu>
  </Dropdown>
</Column>

Do I need to implement the opening and closing on click by myself?

Versions

[email protected] [email protected] [email protected]

matheusgrieger avatar Aug 01 '19 14:08 matheusgrieger

The example in the documentation has a custom implementation for opening and closing so I assume that's what you have to do. https://github.com/AlgusDark/bloomer/blob/b9af8271840c9a52ecf493f3b1f919d8cd3e5fc1/docs/src/Scenes/Documentation/Components/Scenes/Dropdown.tsx#L41

The documentation strongly implies that isActive is needed only if you want the dropdown to be permanently open, so maybe the wording should be tweaked there if that's not really the case.

juhana avatar Sep 11 '19 07:09 juhana

Yeah, that's where my doubt originated from. I have a custom implementation, though. Thanks!

matheusgrieger avatar Sep 11 '19 12:09 matheusgrieger

I will rewrite Bloomer to make it lighter than it is now and it will be easier to implement new Bulma.

At first wanted to create it with styled components but it was so hard to keep track to changes on Bulma :/

AlgusDark avatar Sep 11 '19 12:09 AlgusDark

Wouldn't styled components break theming capabilities with Bulma variables?

matheusgrieger avatar Sep 11 '19 12:09 matheusgrieger

By the way, if there's any support I can provide, be it in dev or test, I'm up for it!

matheusgrieger avatar Sep 11 '19 12:09 matheusgrieger

Wouldn't styled components break theming capabilities with Bulma variables?

My idea was to transform all sass logic into styled components css and use theming based on that. Too crazy to maintain but was very interesting doing it. Better is to wait for Bulma to use css variables.

By the way, if there's any support I can provide, be it in dev or test, I'm up for it!

Of course. If you have knowledge with lerna, would be interesting doing this a mono repo with Bloomer and Bloomer page. I will start doing all the tooling for Babel and eslint+TS.

AlgusDark avatar Sep 11 '19 12:09 AlgusDark