Skip to content

Commit 83ae860

Browse files
feat(FeedLabel): denote admin-only label
1 parent be0b052 commit 83ae860

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/common/components/FeedLabel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import tinycolor from 'tinycolor2'
3+
import Icon from '@conveyal/woonerf/components/icon'
34

45
const getComplementaryColor = (cssHex, strength) => {
56
const color = tinycolor(cssHex)
@@ -11,7 +12,7 @@ const getComplementaryColor = (cssHex, strength) => {
1112
}
1213

1314
export default function Label (props) {
14-
const { name, color, small } = props
15+
const { name, color, small, adminOnly } = props
1516

1617
return (
1718
<span
@@ -22,6 +23,7 @@ export default function Label (props) {
2223
borderColor: getComplementaryColor(color, 10)
2324
}}
2425
>
26+
{adminOnly ? <Icon type='lock' /> : ''}
2527
{name}
2628
</span>
2729
)

0 commit comments

Comments
 (0)