Welcome to mirror list, hosted at ThFree Co, Russian Federation.

components.md « fe_guide « development « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1c5ddd5e2a5f50ac78bdd2d8940fa2cf025004b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Components

## Contents

- [Dropdowns](#dropdowns)

## Dropdowns

See also the [corresponding UX guide](https://design.gitlab.com/#/components/dropdowns).

### How to style a Bootstrap dropdown

1. Use the HTML structure provided by the [docs][bootstrap-dropdowns]
1. Add a specific class to the top level `.dropdown` element

   ```Haml
   .dropdown.my-dropdown
     %button{ type: 'button', data: { toggle: 'dropdown' }, 'aria-haspopup': true, 'aria-expanded': false }
       %span.dropdown-toggle-text
         Toggle Dropdown
       = icon('chevron-down')

     %ul.dropdown-menu
       %li
         %a
           item!
   ```

   Or use the helpers

   ```Haml
   .dropdown.my-dropdown
     = dropdown_toggle('Toogle!', { toggle: 'dropdown' })
     = dropdown_content
       %li
         %a
           item!
   ```

[bootstrap-dropdowns]: https://getbootstrap.com/docs/3.3/javascript/#dropdowns