Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 34e9f2d3

Přidáno uživatelem Lukáš Vlček před více než 2 roky(ů)

AnnotationContext use demo

Zobrazit rozdíly:

webapp/components/annotation/annotationPanel.tsx
1 1
import { Stack } from 'react-bootstrap';
2 2
import { AnnotationItem } from './annotationItem';
3 3
import { Occurrence, Tag } from '../models/tag';
4
import { useContext } from 'react';
5
import { AnnotationContext } from '../../contexts/AnnotationContext';
4 6

  
5 7
type AnnotationPanelProps = {
6 8
    tags: Tag[];
......
16 18
 * @returns Panel with a list of annotations.
17 19
 */
18 20
export function AnnotationPanel(props: AnnotationPanelProps) {
21
    const { tags } = useContext(AnnotationContext);
22

  
19 23
    return (
20 24
        <div>
21 25
            <p>Panel with a list of annotations</p>

Také k dispozici: Unified diff