1.0.0-preview.1 • Published 4 years ago

@gfsdeliver/gfs-dropdown-menu v1.0.0-preview.1

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
4 years ago

Installation

Properties

PropertyDescription
labelTop level menu text
iconAdds an icon next to the label
jsonMenubuids the dropdown menu from a json

Examples

<gfs-dropdown-menu id="myMenu" icon="expand-more"
                    label="Static content">
                    <a href="#"><iron-icon icon="social:person"></iron-icon>Account Settings</a>
                    <a href="#"><iron-icon icon="warning"></iron-icon>Notifications</a>
                    <a href="#"><iron-icon icon="exit-to-app"></iron-icon>Sign out</a>
</gfs-dropdown-menu>

<gfs-dropdown-menu id="myJsonMenu" icon="expand-more"
                    label="Build with json"
                    full-menu='[{"name": "Cloud Login", "icon":"cloud"}, {"name": "Help", "icon":"help"}, {"name": "Report a bug", "icon":"bug-report"}]'>
</gfs-dropdown-menu>

Styling

Custom propertyDescriptionDefault
--gfs-dropdown-menu-font-sizemenu font size13px
--gfs-dropdown-menu-backgroundopened menu background color#fff
--gfs-dropdown-menu-border-radiusmenu radius corners3px
--gfs-dropdown-menu-box-shadowadds a shadow effect on opened menu box0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2)
--gfs-dropdown-menu-background-hovertop level background color (label)#f7f8fb
--gfs-dropdown-menu-top-bordera top border when menu is opened5px solid var(--gfs-primary-color)
--gfs-dropdown-menu-arrowcolor sould be same a above, adds a triangle on top of the opened menuvar(--gfs-primary-color)
--gfs-dropdown-border-badds a bottom border on each menu item on list1px solid #eef1f6
--gfs-dropdown-item-hoverhover menu background colorvar(--light-grey-color)