2020-03-22 21:49:05 +08:00
|
|
|
import * as React from 'react';
|
2020-03-23 00:06:40 +08:00
|
|
|
import { RegExpDiagram } from '../components/Diagram';
|
2020-03-22 21:49:05 +08:00
|
|
|
|
2020-03-23 00:06:40 +08:00
|
|
|
export const RegexpDiagramView: React.FC = () => {
|
|
|
|
// @ts-ignore
|
|
|
|
const regexpGroups = window.regexpGroups;
|
|
|
|
console.log(regexpGroups);
|
2020-03-22 21:49:05 +08:00
|
|
|
return (
|
2020-03-23 00:06:40 +08:00
|
|
|
<>
|
|
|
|
<div>
|
2020-03-23 22:50:16 +08:00
|
|
|
{regexpGroups.map((regexp: string) => <RegExpDiagram className="regexp-diagram" regexp={new RegExp(regexp)} />)}
|
2020-03-23 00:06:40 +08:00
|
|
|
</div>
|
|
|
|
</>
|
2020-03-22 21:49:05 +08:00
|
|
|
);
|
|
|
|
};
|