/
vshmidt
/
label-studio
Обзор
Документация
Войти
/
vshmidt
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
web/libs/editor/src/components/CurrentEntity/GroundTruth.jsx
38 строк
1 KB
Raul Martin
feat: Migrate SCSS to plain CSS with PostCSS, replace Stylelint with Biome (#9584)
12 мар 2026, 20:57
Не верифицирован
12 мар 2026, 20:57
3f31128
Код
Авторство
О чём код?
import { observer } from "mobx-react"; import { IconStar, IconStarOutline } from "@humansignal/icons"; import { Button, Tooltip } from "@humansignal/ui"; import { cn } from "../../utils/bem"; import "./GroundTruth.prefix.css"; export const GroundTruth = observer(({ entity, disabled = false, size = "md" }) => { const title = entity.ground_truth ? "Unset this result as a ground truth" : "Set this result as a ground truth"; const IndicatorIcon = !entity.ground_truth ? IconStarOutline : IconStar; return ( !entity.skipped && !entity.userGenerate && entity.type !== "prediction" && ( <div className={cn("ground-truth").mod({ disabled, size }).toClassName()}> <Tooltip alignment="top-left" title={title}> <Button size="small" look="string" className="!p-0" onClick={(ev) => { ev.preventDefault(); entity.setGroundTruth(!entity.ground_truth); }} data-testid="bottombar-ground-truth-button" > <IndicatorIcon className={cn("ground-truth") .elem("indicator") .mod({ active: entity.ground_truth, dark: true }) .toClassName()} /> </Button> </Tooltip> </div> ) ); });