Skip to content

Commit e779b6c

Browse files
committed
fix(Button/Checkbox): use JSX pragma
1 parent 02c885a commit e779b6c

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/common/components/Button/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import * as React from 'react';
2+
/** @jsxRuntime classic */
3+
/** @jsx jsx */
4+
import { css, jsx } from '@emotion/react';
25

36
import styles from './styles';
47

src/common/components/Checkbox/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import * as React from 'react';
2+
/** @jsxRuntime classic */
3+
/** @jsx jsx */
4+
import { css, jsx } from '@emotion/react';
25

36
import styles from './styles';
47

58
const Checkbox = React.forwardRef(
69
(props: Record<string, any>, ref: React.ForwardedRef<HTMLInputElement>) => {
7-
return <input type="checkbox" ref={ref} {...props} css={styles()} />;
10+
return <input type="checkbox" ref={ref} {...props} css={styles} />;
811
},
912
);
1013

src/common/components/Checkbox/styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
/** @jsx jsx */
33
import { css, jsx } from '@emotion/react';
44

5-
export default () => css`
5+
export default css`
66
cursor: pointer;
77
`;

src/tree/CellTree.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Nullish, State } from '@table-library/react-table-library/types/common'
1212
import { TableNode } from '@table-library/react-table-library/types/table';
1313
import { CellTreeProps } from '@table-library/react-table-library/types/tree';
1414

15-
const style = () => css`
15+
const style = css`
1616
display: flex;
1717
align-items: center;
1818
@@ -85,7 +85,7 @@ export const CellTree: React.FC<CellTreeProps> = ({
8585

8686
return (
8787
<Cell {...passThrough}>
88-
<div css={style()}>
88+
<div css={style}>
8989
<Button
9090
className="prefix narrow"
9191
margin={icon ? mergedTreeIconOptions.margin : mergedTreeIconOptions.noIconMargin}

0 commit comments

Comments
 (0)