| 12345678910111213141516171819202122232425262728293031323334 |
- /**
- * 站点标签组件
- * @邠心vbe on 2023/11/30
- */
- import React from 'react';
- import TextView from './TextView';
- const SiteLabelView = ({
- label,
- color = textLight,
- background = colorPrimary
- }) => {
- if (label) {
- return (
- <TextView
- style={{
- color: color || textLight,
- height: 22,
- fontSize: 12,
- marginRight: 5,
- marginBottom: 5,
- borderRadius: 3,
- ...$padding(0, 6),
- backgroundColor: background || colorPrimary
- }}>
- {label}
- </TextView>
- )
- } else {
- return <></>
- }
- };
- export default SiteLabelView;
|