Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Created January 14, 2022 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OliverJAsh/51b2138922a93a7f7d8ed53701ce9afe to your computer and use it in GitHub Desktop.
Save OliverJAsh/51b2138922a93a7f7d8ed53701ce9afe to your computer and use it in GitHub Desktop.
Old vs new JSX transform
return (0, a.jsxs)(
ae.im,
{
id: s,
style: { marginLeft: -ve },
popoverProps: c,
children: [
(0, a.jsx)(
ae.xz,
{ showDropdownSymbol: !0, className: (0, ne.Bt)({}), children: t(d) },
void 0,
),
(0, a.jsx)(
ce.v2,
{
bgColor: 'white',
children: (0, a.jsx)(
'ul',
{
className: he,
children: l.map((e) => {
const s = d === e,
t = (0, i.zG)(n, r.set(e), pe, re.y$.user);
return (0, a.jsx)(
'li',
{
children: (0, a.jsx)(
ce.Ol,
{
to: t,
text: e,
disabled: s,
shouldReplaceHistoryEntry: !0,
children: (0, a.jsx)(
ce.Wx,
{ isActive: s, children: o(e) },
void 0,
),
},
void 0,
),
},
e,
);
}),
},
void 0,
),
},
void 0,
),
],
},
void 0,
);
return r.createElement(
ae.im,
{ id: t, style: { marginLeft: -de }, popoverProps: m },
r.createElement(ae.xz, { showDropdownSymbol: !0, className: (0, re.Bt)({}) }, a(i)),
r.createElement(
ce.v2,
{ bgColor: 'white' },
r.createElement(
'ul',
{ className: pe },
n.map((e) => {
const t = i === e,
a = (0, l.zG)(o, c.set(e), me, ie.y$.user);
return r.createElement(
'li',
{ key: e },
r.createElement(
ce.Ol,
{ to: a, text: e, disabled: t, shouldReplaceHistoryEntry: !0 },
r.createElement(ce.Wx, { isActive: t }, s(e)),
),
);
}),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment