react-vtl-editor

0.3.2 • Public • Published

react-vtl-editor

A react VTL editor

Build Status Coverage Status

The documentation can be found in the docs folder and browsed online.

Storybook is also available online.

Usage

import React, { useState } from 'react';
import { VtlEditor } from 'react-vtl-editor';

const MyComponent = () => {
	const [value, setValue] = useState('');
	const [valid, setValid] = useState(true);
	return (
		<>
			<VtlEditor handleValue={setValue} handleValid={setValid} />
			<div>{`My expression text : ${value}`}</div>
			<div>{`Is my expression valid : ${valid}`}</div>
		</>
	);
};

export default MyComponent;

How to improve the library locally

In order to avoid some errors with the React library and your React application (two versions of React loaded by browser), you should not use the npm link command. You should prefer the npm pack command. You should have a look to this blog post for more informations.

Todo

  • work on UI customization of the component

Package Sidebar

Install

npm i react-vtl-editor

Weekly Downloads

18

Version

0.3.2

License

Apache-2.0

Unpacked Size

9.53 MB

Total Files

54

Last publish

Collaborators

  • nicolaval