aboutsummaryrefslogtreecommitdiff
path: root/test/snippets/jsx-top-level.tsx
blob: 2b49b59596ca0a10accaf42f60d4c104b69addc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const isDropdown = true;
const iconName = "";
const adjustedPadding = 5;

const Icon = ({ name, size, color }) => {
  return name;
};

const Foo = <Icon name="arrow-down" size="1.5em" color="currentColor" />;
const yoooo = [<Icon name="arrow-down" size="1.5em" color="currentColor" />];
const iconProps = {
  // This regression test is to ensure that the JSX value here does not print as an e_missing (nothing)
  rightIcon: <Icon name="arrow-down" size="1.5em" color="currentColor" />,
  paddingRight: adjustedPadding,
};

export function test() {
  const foo = iconProps.rightIcon;
  yoooo[0];
  return testDone(import.meta.url);
}