Spaces:
Configuration error
Configuration error
Download web/libs/editor/src/components/TextHighlight/EmojiNode.jsx from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx
-
curl -L -o EmojiNode.jsx https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx
748 Bytes
| import { PropTypes } from "prop-types"; | |
| import { HtxTextNode } from "./Node"; | |
| /** | |
| * Node for Emoji | |
| * @param {*} props | |
| */ | |
| const EmojiNode = (props) => { | |
| return ( | |
| <HtxTextNode | |
| id={props.id} | |
| highlightStyle={props.highlightStyle} | |
| charIndex={props.charIndex} | |
| range={props.range} | |
| overlap={props.overlap} | |
| > | |
| {`${props.text[props.charIndex]}${props.text[props.charIndex + 1]}`} | |
| </HtxTextNode> | |
| ); | |
| }; | |
| EmojiNode.propTypes = { | |
| id: PropTypes.string.isRequired, | |
| highlightStyle: PropTypes.object, | |
| charIndex: PropTypes.number.isRequired, | |
| range: PropTypes.oneOfType([PropTypes.number, PropTypes.object]), | |
| overlap: PropTypes.array, | |
| text: PropTypes.string.isRequired, | |
| }; | |
| export default EmojiNode; | |