Previews

No matching results.

x
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
<!-- Default -->
<span data-view-component="true" class="Label">Default</span>
<!-- Primary -->
<span data-view-component="true" class="Label Label--primary">Primary</span>
<!-- Secondary -->
<span data-view-component="true" class="Label Label--secondary">Secondary</span>
<!-- Accent -->
<span data-view-component="true" class="Label Label--accent">Accent</span>
<!-- Success -->
<span data-view-component="true" class="Label Label--success">Success</span>
<!-- Attention -->
<span data-view-component="true" class="Label Label--attention">Attention</span>
<!-- Danger -->
<span data-view-component="true" class="Label Label--danger">Danger</span>
<!-- Severe -->
<span data-view-component="true" class="Label Label--severe">Severe</span>
<!-- Done -->
<span data-view-component="true" class="Label Label--done">Done</span>
<!-- Sponsors -->
<span data-view-component="true" class="Label Label--sponsors">Sponsors</span>
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
# Default
render(Primer::Beta::Label.new) { "Default" }
# Primary
render(Primer::Beta::Label.new(scheme: :primary)) { "Primary" }
# Secondary
render(Primer::Beta::Label.new(scheme: :secondary)) { "Secondary" }
# Accent
render(Primer::Beta::Label.new(scheme: :accent)) { "Accent" }
# Success
render(Primer::Beta::Label.new(scheme: :success)) { "Success" }
# Attention
render(Primer::Beta::Label.new(scheme: :attention)) { "Attention" }
# Danger
render(Primer::Beta::Label.new(scheme: :danger)) { "Danger" }
# Severe
render(Primer::Beta::Label.new(scheme: :severe)) { "Severe" }
# Done
render(Primer::Beta::Label.new(scheme: :done)) { "Done" }
# Sponsors
render(Primer::Beta::Label.new(scheme: :sponsors)) { "Sponsors" }

app/components/primer/beta/label.css

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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* Labels */
/* Provide a wrapper to ensure labels stick together */
.labels {
position: relative;
}
/* Default 20px */
.label, /* TODO: Deprecate */
.Label {
display: inline-block;
padding: 0 var(--base-size-6);
font-size: var(--text-body-size-small);
font-weight: var(--base-text-weight-medium);
line-height: 18px;
white-space: nowrap;
border: var(--borderWidth-thin) solid var(--borderColor-default);
border-radius: var(--borderRadius-full);
}
:is(.label,.Label):hover {
-webkit-text-decoration: none;
text-decoration: none;
}
/* Large 24px */
.Label--large {
padding: 0 var(--base-size-8);
line-height: 22px;
}
/* Inline */
/* Doesn't increase height of parent element
** Can be used with different font-sizes */
.Label--inline {
display: inline;
padding: 0.12em 0.5em;
font-size: 85%;
}
/* Contrast */
.Label--primary {
color: var(--fgColor-default);
border-color: var(--borderColor-neutral-emphasis);
}
.Label--secondary {
color: var(--fgColor-muted);
border-color: var(--borderColor-default);
}
/* Colors */
.Label--info, /* TODO: deprecate */
.Label--accent {
color: var(--fgColor-accent);
border-color: var(--borderColor-accent-emphasis);
}
.Label--success {
color: var(--fgColor-success);
border-color: var(--borderColor-success-emphasis);
}
.Label--warning, /* TODO: deprecate */
.Label--attention {
color: var(--fgColor-attention);
border-color: var(--borderColor-attention-emphasis);
}
.Label--severe {
color: var(--fgColor-severe);
border-color: var(--borderColor-severe-emphasis);
}
.Label--danger {
color: var(--fgColor-danger);
border-color: var(--borderColor-danger-emphasis);
}
.Label--open {
color: var(--fgColor-open);
border-color: var(--borderColor-open-emphasis);
}
.Label--closed {
color: var(--fgColor-closed);
border-color: var(--borderColor-closed-emphasis);
}
.Label--done {
color: var(--fgColor-done);
border-color: var(--borderColor-done-emphasis);
}
.Label--sponsors {
color: var(--fgColor-sponsors);
border-color: var(--borderColor-sponsors-emphasis);
}