signal-desktop/ts/components/stickers/StickerPreviewModal.md
Ken Powers be5d0837f8 Support additional sticker states
Co-authored-by: scott@signal.org
Co-authored-by: ken@signal.org
2019-05-29 11:01:32 -07:00

692 B

Not yet installed

const abeSticker = { url: util.squareStickerObjectUrl, packId: 'abe' };

const pack = {
  id: 'foo',
  cover: abeSticker,
  title: 'Foo',
  isBlessed: true,
  author: 'Foo McBarrington',
  status: 'downloaded',
  stickers: Array(101)
    .fill(0)
    .map((n, id) => ({ ...abeSticker, id })),
};

<util.ConversationContext theme={util.theme}>
  <StickerPreviewModal
    onClose={() => console.log('onClose')}
    installStickerPack={(...args) => console.log('installStickerPack', ...args)}
    uninstallStickerPack={(...args) =>
      console.log('uninstallStickerPack', ...args)
    }
    i18n={util.i18n}
    pack={pack}
  />
</util.ConversationContext>;