mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 08:26:37 +08:00
15 lines
312 B
JavaScript
15 lines
312 B
JavaScript
import { Label } from 'semantic-ui-react';
|
|
|
|
export function renderText(text, limit) {
|
|
if (text.length > limit) {
|
|
return text.slice(0, limit - 3) + '...';
|
|
}
|
|
return text;
|
|
}
|
|
|
|
export function renderGroup(group) {
|
|
if (group === "") {
|
|
return <Label>default</Label>
|
|
}
|
|
return <Label>{group}</Label>
|
|
} |