Previews

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
41
42
43
44
45
46
47
48
49
50
51
# AutoComplete with non-visible label
# rubocop:disable Primer/ComponentNameMigration
render(
Primer::Alpha::AutoComplete.new(
label_text: "Select a fruit",
input_id: "input-id-1",
list_id: "test-id-1",
src: UrlHelpers.autocomplete_index_path(version: "alpha"),
is_label_visible: false
)
)
# rubocop:enable Primer/ComponentNameMigration
# AutoComplete with inline label
# rubocop:disable Primer/ComponentNameMigration
render(
Primer::Alpha::AutoComplete.new(
label_text: "Select a fruit",
input_id: "input-id-2",
list_id: "test-id-2",
src: UrlHelpers.autocomplete_index_path(version: "alpha"),
is_label_inline: true
)
)
# rubocop:enable Primer/ComponentNameMigration
# AutoComplete with search icon
# rubocop:disable Primer/ComponentNameMigration
render(
Primer::Alpha::AutoComplete.new(
label_text: "Select a fruit",
input_id: "input-id-3",
list_id: "test-id-3",
src: UrlHelpers.autocomplete_index_path(version: "alpha"),
with_icon: true
)
)
# rubocop:enable Primer/ComponentNameMigration
# AutoComplete with clear button
# rubocop:disable Primer/ComponentNameMigration
render(
Primer::Alpha::AutoComplete.new(
label_text: "Select a fruit",
input_id: "input-id-4",
list_id: "test-id-4",
src: UrlHelpers.autocomplete_index_path(version: "alpha"),
is_clearable: true
)
)
# rubocop:enable Primer/ComponentNameMigration