From c51075f50e4b6af8cd32996e121e46b5b13e52ea Mon Sep 17 00:00:00 2001 From: "Serhii.Tsybulskyi" Date: Fri, 22 Nov 2024 12:00:11 +0200 Subject: [PATCH] add sample with icon and text --- docs/demos/Cluster.story.tsx | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/docs/demos/Cluster.story.tsx b/docs/demos/Cluster.story.tsx index b06d002e..0f78b9ce 100644 --- a/docs/demos/Cluster.story.tsx +++ b/docs/demos/Cluster.story.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useState } from 'react'; -import { Billboard, Svg, Text } from 'glodrei'; +import { Billboard, Html, Svg, Text } from 'glodrei'; import { Color, DoubleSide } from 'three'; import { a } from '@react-spring/three'; import { GraphCanvas, Icon, Label, lightTheme, Sphere } from '../../src'; @@ -468,13 +468,7 @@ export const Custom = () => ( draggable edges={clusterEdges} clusterAttribute="type" - onRenderCluster={({ - label, - opacity, - outerRadius, - innerRadius, - theme - }) => ( + onRenderCluster={({ label, opacity, outerRadius, innerRadius, theme }) => ( <> ( /> {label && ( - )}