Label with a secondary tittle
HenriqueMunhoz opened this issue · comments
Hey,
There is any way that i can put a secondary label inside the primary one?
Something like { label: Some Place ( Place counter ) }
Why that? i have a counter that i needs to put in the label but with a different colour, "Some Place" needs to be black and "( Place Counter)" needs to be gray and italic
In HTML i only have the tag rct-tittle that gets all the string "Some Place ( Place counter )" so i cant change them separately.
Thanks :D
@HenriqueMunhoz in the label, we can pass a react component also, while you are generating the node list for the tree instead of passing the text for the label you can pass a react component with the styles.
Node list example
[{
'value':1,
'label':<ReactComponent primaryLabel={p1} secondaryLabel={p2}/>
,
}]
where p1 and p2 will be your primary and secondary labels/
Thanks a lot for the answer @EldhosAji