david
(David Taylor)
Abril 10, 2025, 11:06am
7
Está tudo bem em brincar com isso, mas certifique-se de ler o aviso na descrição da configuração. Este modo ainda não está pronto para uso em produção. Nós nem o usamos no Meta.
Para a implementação atual de post-stream, você precisaria usar a antiga API decorateWidget ou a API addPosterIcon:
/**
* addPosterIcons(callback)
*
* This function can be used to add one, or multiple icons, with a link that will
* be displayed beside a poster's name. The `callback` is called with the post's
* user custom fields and post attributes. One or multiple icons may be rendered
* when the callback returns an array of objects with the appropriate attributes.
*
* The returned object(s) each can have the following attributes:
*
* icon the font awesome icon to render
* emoji an emoji icon to render
* className (optional) a css class to apply to the icon
* url (optional) where to link the icon
* title (optional) the tooltip title for the icon on hover
* text (optional) text to display alongside the emoji or icon
*
* ```
* api.addPosterIcons((cfs, attrs) => {
* if (cfs.customer) {
This file has been truncated. show original
2 curtidas