github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/webui/src/lib/components/badges.tsx (about)

     1  import React, {FC} from 'react';
     2  import CSS from 'csstype';
     3  import Badge from 'react-bootstrap/Badge';
     4  import Stack from 'react-bootstrap/Stack';
     5  import { FaLock } from 'react-icons/fa';
     6  
     7  export const ReadOnlyBadge: FC<{ readOnly: boolean, style: CSS.Properties }> = ({ readOnly, style }) => {
     8    return readOnly ? (
     9      <Badge pill bg="secondary" style={style}>
    10          <Stack direction="horizontal" gap={1}>
    11              <FaLock />{`Read-only`}
    12          </Stack>
    13      </Badge>
    14    ) : null;
    15  };