M
M
mishapsv2020-01-17 11:59:41
React
mishapsv, 2020-01-17 11:59:41

Is it possible to add components to the parameters of a used React component?

There is a component that is defined in the lib and we specify the data during initialization

<PageHeaderWrapper
        title={`Playlist: ${playlist.name}` }
        content={<PlaylistInfo playlist={playlist}/>}
      >

Is it possible somehow to add a component at the end of the title ( title={`Playlist: ${playlist.name}` }) ?
<Icon type="edit" />

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hzzzzl, 2020-01-17
@hzzzzl

<PageHeaderWrapper
        title={
         <>
           <span>{`Playlist: ${playlist.name}`}</span>
           <Icon type="edit" />
         </>
        }
        content={<PlaylistInfo playlist={playlist}/>}
      >

try something like this

R
Roman Alexandrovich, 2020-01-17
@RomReed

https://codesandbox.io/s/strange-lichterman-4q395

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question