session-desktop/ts/components/conversation/StagedLinkPreview.md
Scott Nonnenberg 813924685e Link Previews
2019-01-29 13:53:14 -08:00

2 KiB

Still loading

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={false}
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>

No image

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={true}
    title="This is a super-sweet site"
    domain="instagram.com"
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>

Image

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={true}
    title="This is a super-sweet site"
    domain="instagram.com"
    image={{
      url: util.gifObjectUrl,
      contentType: 'image/gif',
    }}
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>

Image, no title

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={true}
    domain="instagram.com"
    image={{
      url: util.gifObjectUrl,
      contentType: 'image/gif',
    }}
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>

No image, long title

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={true}
    title="This is a super-sweet site. And it's got some really amazing content in store for you if you just click that link. Can you click that link for me?"
    domain="instagram.com"
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>

Image, long title

<util.ConversationContext theme={util.theme}>
  <StagedLinkPreview
    isLoaded={true}
    title="This is a super-sweet site. And it's got some really amazing content in store for you if you just click that link. Can you click that link for me?"
    domain="instagram.com"
    image={{
      url: util.gifObjectUrl,
      contentType: 'image/gif',
    }}
    onClose={() => console.log('onClose')}
    i18n={util.i18n}
  />
</util.ConversationContext>