1.1.5 • Published 2 years ago

textareawithpattern v1.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

add style and own node into textarea

install Library

npm i textareawithpattern

import

import { AddPattern, TextAreaPattern } from 'textareawithpattern';

use Library

import { AddPattern, TextAreaPattern } from "textareawithpattern";
import { useState } from "react";

export default function App() {
  const [value, setValue] = useState<string>("")
  console.log("textarea value :", value)

  return (
    <div>
      <AddPattern
        seperator={"sec"}
        pattern={"first"}
        tagClass={"tagClass"}
        setValue={setValue}
        node={<button> Add Pattern</button>}
      />
      <TextAreaPattern
        setValue={setValue}
        node={<pre></pre>}
      />
    </div>
  );
}

description

seperator :

Separator to separate pattern from text

pattern :

the relevant variable

setValue :

The state related to updating the value inside the textarea

node :

html tag for textarea and button (you can use your own styles there)

tagClass :

class of pattern section inside of textarea

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago