We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be0b052 commit 83ae860Copy full SHA for 83ae860
lib/common/components/FeedLabel.js
@@ -1,5 +1,6 @@
1
import React from 'react'
2
import tinycolor from 'tinycolor2'
3
+import Icon from '@conveyal/woonerf/components/icon'
4
5
const getComplementaryColor = (cssHex, strength) => {
6
const color = tinycolor(cssHex)
@@ -11,7 +12,7 @@ const getComplementaryColor = (cssHex, strength) => {
11
12
}
13
14
export default function Label (props) {
- const { name, color, small } = props
15
+ const { name, color, small, adminOnly } = props
16
17
return (
18
<span
@@ -22,6 +23,7 @@ export default function Label (props) {
22
23
borderColor: getComplementaryColor(color, 10)
24
}}
25
>
26
+ {adminOnly ? <Icon type='lock' /> : ''}
27
{name}
28
</span>
29
)
0 commit comments