2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-18 12:39:39 +03:00
Files
bbob/packages/bbob-react
Wai Lam Yau e875c7832d fix(react): rendering of react for screenreaders (#220)
* Fix rendering of react for screenreaders

* Fix rendering of react for screenreaders (#1)

Co-authored-by: WAI YAU <waister@ip-192-168-1-52.eu-west-1.compute.internal>

* Tweak

* Change code to be the source instead of the result

---------

Co-authored-by: WAI YAU <waister@ip-192-168-1-52.eu-west-1.compute.internal>
Co-authored-by: richardmtsr <richard.moss@thestudentroom.com>
2024-03-27 02:46:59 +02:00
..
2020-01-22 20:25:42 +02:00
2021-11-29 00:33:06 +02:00
2023-10-23 13:21:56 +02:00
2023-10-23 13:21:56 +02:00

@bbob/react

install size Known Vulnerabilities

Converts @bbob/parser AST tree to React

npm i @bbob/react @bbob/preset-react
import React from 'react'
import BBCode from '@bbob/react';
import presetReact from '@bbob/preset-react';

const plugins = [presetReact()];

export default () => (
    <BBCode plugins={plugins}>
    [table]
      [tr]
          [td]table 1[/td]
          [td]table 2[/td]
      [/tr]
      [tr]
          [td]table 3[/td]
          [td]table 4[/td]
      [/tr]
    [/table]
    </BBCode>
)
import { render } from '@bbob/react'

export default () => render(`
[table]
  [tr]
      [td]table 1[/td]
      [td]table 2[/td]
  [/tr]
  [tr]
      [td]table 3[/td]
      [td]table 4[/td]
  [/tr]
[/table]
`)