Skip to content

Conversation

@jeongshin
Copy link

Feature: add custom component support

Hi, thanks for great library.
I'd like to add support for custom react element support for images or other ui as mentioned on #2

I tested on iOS and Android and it look works fine.

{SpannableBuilder.getInstance($typo)
            .appendCustom('헉배', $typoPink)
            .append('님은 ')
            .appendCustom(`${cards.length}`, $number)
            .append(' 개 성공했어요! ')
            .appendCustomComponent(
              <FastImage
                source={{
                  uri: 'https://talkimg.imbc.com/TVianUpload/tvian/TViews/image/2023/04/27/0e83f60f-51d4-49b2-919c-92ec2ff928c5.jpg',
                }}
                style={{ width: 30, height: 30, borderRadius: 30 }}
              />,
            )
            .build()}

IMG_6390

@mym0404 mym0404 self-assigned this Apr 12, 2024
@mym0404 mym0404 merged commit 83b0ba4 into mj-studio-library:master Apr 12, 2024
@mym0404
Copy link
Member

mym0404 commented Apr 12, 2024

I don't know about that how RN Text handles layout or lifecycle of children. But it seems working.

Thank you for change 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants