elm-semantic-ui icon indicating copy to clipboard operation
elm-semantic-ui copied to clipboard

Add SemanticUI.Modules.Dropdown.Selection.menuItem

Open ocharles opened this issue 6 years ago • 1 comments

This renders a selection dropdown with the item class, suitable for use in ui menu components.

ocharles avatar Dec 12 '19 13:12 ocharles

I'm ok with this PR as is, though I think it's possible you may want to have it as

module Menu.Item

type Config = { active : Bool, inline : Bool }

module Dropdown

type Variation msg
  = Ordinary
  | Item (Menu.Item.Config msg) -- Config from Menu.Item...
  | Button (Button.Config msg) -- ...similar to this

because the order in which classes are applied appears to matter, so technically it would need to be

ui ...(dropdown classes)... dropdown ....(item classes)... item

(though often, but not always, a random order works by accident)

See: https://github.com/circuithub/elm-semantic-ui/blob/34e903d4b5957babcbc9b95dce250994cd32fedc/src/SemanticUI/Modules/Dropdown.elm#L264 for how it works with button at the moment

rehno-lindeque avatar Dec 18 '19 18:12 rehno-lindeque