Giter Site home page Giter Site logo

Conditionally styled emoji about interweave HOT 13 CLOSED

milesj avatar milesj commented on June 10, 2024
Conditionally styled emoji

from interweave.

Comments (13)

milesj avatar milesj commented on June 10, 2024

Thanks for the kind words!

I'm actually working on v2 of the library right this moment. I can quickly look into this.

from interweave.

milesj avatar milesj commented on June 10, 2024

Got it working.
screen shot 2016-12-12 at 23 08 30

from interweave.

milesj avatar milesj commented on June 10, 2024

Done! Thanks for the awesome idea.

from interweave.

anri-asaturov avatar anri-asaturov commented on June 10, 2024

Oh. Thanks. Those callbacks will definitely be useful. Are you working on this as a part of some project?

from interweave.

milesj avatar milesj commented on June 10, 2024

@anri-asaturov We use this a bit at my work, but besides that, mainly for fun. Wanted to learn more about emojis.

from interweave.

anri-asaturov avatar anri-asaturov commented on June 10, 2024

Quick question, if you don't mind - how do u publish npm package so /lib becomes a root?

from interweave.

milesj avatar milesj commented on June 10, 2024

Just append the folder to the publish command: npm publish ./lib/. Which I seem to forgot to do a lot, like I did with the 2.0.0 release. Had to bump a 2.0.1.

I'm also working on a new release/deploy tool that builds and stages everything to lib/, then deploys it as root.

from interweave.

anri-asaturov avatar anri-asaturov commented on June 10, 2024

Thanks. Btw, emoji enlargement doesn't work if convertEmoji=false, I'll try to fix that soon.

from interweave.

milesj avatar milesj commented on June 10, 2024

It'll only work if the Emoji component is rendered. Unicode emojis will be rendered as is.

from interweave.

anri-asaturov avatar anri-asaturov commented on June 10, 2024

We could wrap them in a span if they have to be enlarged. Or apply the enlargement class to parent node?

from interweave.

milesj avatar milesj commented on June 10, 2024

That may work. We would just need a way to cleanly verify that a span + unicode symbol is an emoji React element.

from interweave.

anri-asaturov avatar anri-asaturov commented on June 10, 2024

What if we just modify the same Emoji component to render unicode if that's the setting?

from interweave.

milesj avatar milesj commented on June 10, 2024

Yeah most likely. We can move this logic to a prop on the Emoji component.

https://github.com/milesj/interweave/blob/master/src/matchers/Emoji.js#L29

<Emoji {...props} renderUnicode={this.options.renderUnicode} />

from interweave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.