react-typist icon indicating copy to clipboard operation
react-typist copied to clipboard

curso for block element doesn't work properly

Open amirho1 opened this issue 3 years ago • 2 comments

The typist's cursor doesn't work properly when it has a block element i.e H1 it goes to one line bottom

import "./Home.scss";
import React from "react";
import Typist from "react-typist";

export default function Home() {
  return (
    <div className="home page">
      <Typist>
        <h1 style={{ display: "inline" }}>
          Testing <b style={{ color: "#7a5bf5" }}>Typist</b> inside an Inline
          element
        </h1>
      </Typist>

      <Typist>
        <h1 style={{ marginTop: "2em" }}>
          Testing <b style={{ color: "#7a5bf5" }}>Typist</b> inside a Block
          element
        </h1>
      </Typist>
    </div>
  );
}

Screenshot from 2021-06-16 10-39-14

amirho1 avatar Jun 16 '21 06:06 amirho1

I'm also struggling with it. Did you find any solution?

You could check issue #82. I used a temporary solution just setting CSS property of block elements to inline-block and then used line-breaks to write on a new line.

LCSLITX avatar Nov 06 '21 21:11 LCSLITX

Related #116

softmarshmallow avatar Nov 26 '21 02:11 softmarshmallow