-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajoute l'infobulle décrivant la source externe de données sélectionné…
…e (dans le graphe indicateur détail)
- Loading branch information
1 parent
635f4da
commit 5b1a3f1
Showing
4 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...esentransitions.react/src/app/pages/collectivite/Indicateurs/detail/DataSourceTooltip.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import {Tooltip} from '@tet/ui'; | ||
import {Indicateurs} from '@tet/api'; | ||
|
||
/** | ||
* Affiche une infobulle donnant les informations disponibles pour une source de | ||
* données externe. | ||
*/ | ||
export const DataSourceTooltip = ({ | ||
metadonnee, | ||
children, | ||
}: { | ||
metadonnee: Indicateurs.domain.SourceMetadonnee; | ||
children: JSX.Element; | ||
}) => { | ||
return ( | ||
<Tooltip | ||
label={ | ||
<div> | ||
{!!metadonnee.diffuseur && ( | ||
<p> | ||
Diffuseur : <b>{metadonnee.diffuseur}</b> | ||
</p> | ||
)} | ||
{!!metadonnee.producteur && ( | ||
<p> | ||
Producteur : <b>{metadonnee.producteur}</b> | ||
</p> | ||
)} | ||
Version : <b>{new Date(metadonnee.dateVersion).getFullYear()}</b> | ||
{!!metadonnee.methodologie && ( | ||
<p> | ||
Méthodologie / Périmètre : <b>{metadonnee.methodologie}</b> | ||
</p> | ||
)} | ||
{!!metadonnee.limites && ( | ||
<p> | ||
Points d’attention / Limites : <b>{metadonnee.limites}</b> | ||
</p> | ||
)} | ||
</div> | ||
} | ||
> | ||
{children} | ||
</Tooltip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters