Skip to content

Commit e795e70

Browse files
authored
PlatformTag Component (facebook#4178)
1 parent 8f2fcde commit e795e70

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
3+
const PlatformTag = ({platform}) => {
4+
const platformLabel = platform === 'ios' ? 'iOS' : 'Android';
5+
return (
6+
<div
7+
className={`label ${platform}`}
8+
title={`This section is related to ${platformLabel} platform`}>
9+
{platformLabel}
10+
</div>
11+
);
12+
};
13+
14+
export default PlatformTag;

0 commit comments

Comments
 (0)