These are all the files from the Tabler react repos, made to work with laravel and webpack.

This commit is contained in:
James Cole
2019-01-04 17:03:16 +01:00
parent 961e7e92b3
commit 40028c8be7
94 changed files with 51417 additions and 3 deletions

View File

@@ -0,0 +1,43 @@
/* @flow */
import formatTree from './formatter/formatTree';
import parseReactElement from './parser/parseReactElement';
import type { Element as ReactElement } from 'react';
import type { Options } from './options';
const reactElementToJsxString = (
element: ReactElement<any>,
{
filterProps = [],
showDefaultProps = true,
showFunctions = false,
functionValue,
tabStop = 2,
useBooleanShorthandSyntax = true,
useFragmentShortSyntax = true,
sortProps = true,
maxInlineAttributesLineLength,
displayName,
}: Options = {}
) => {
if (!element) {
throw new Error('react-element-to-jsx-string: Expected a ReactElement');
}
const options = {
filterProps,
showDefaultProps,
showFunctions,
functionValue,
tabStop,
useBooleanShorthandSyntax,
useFragmentShortSyntax,
sortProps,
maxInlineAttributesLineLength,
displayName,
};
return formatTree(parseReactElement(element, options), options);
};
export default reactElementToJsxString;