Skip to content

Commit e9e4bf2

Browse files
committed
fix lint
1 parent 10b40f4 commit e9e4bf2

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

packages/@react-spectrum/s2/src/TreeView.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@ import {
1717
TreeItemProps as RACTreeItemProps,
1818
TreeProps as RACTreeProps,
1919
TreeItemRenderProps,
20-
TreeRenderProps,
2120
UNSTABLE_Tree,
2221
UNSTABLE_TreeItem,
2322
UNSTABLE_TreeItemContent,
2423
useContextProps
2524
} from 'react-aria-components';
2625
import {Checkbox, IconContext, Text, TextContext} from '@react-spectrum/s2';
2726
import Chevron from '../ui-icons/Chevron';
27+
import {colorMix, lightDark, style} from '../style' with {type: 'macro'};
2828
import {DOMRef, Key} from '@react-types/shared';
29-
import {colorMix, focusRing, lightDark, style} from '../style' with {type: 'macro'};
3029
import {isAndroid} from '@react-aria/utils';
30+
import {raw} from '../style/style-macro';
3131
import React, {createContext, forwardRef, isValidElement, JSXElementConstructor, ReactElement, useContext, useRef} from 'react';
3232
import {StylesPropWithHeight, UnsafeStyles} from './style-utils';
3333
import {useButton} from '@react-aria/button';
3434
import {useDOMRef} from '@react-spectrum/utils';
3535
import {useLocale} from '@react-aria/i18n';
36-
import { raw } from '../style/style-macro';
3736

3837
interface S2TreeProps {
3938
isDetached?: boolean,
@@ -231,7 +230,7 @@ export const TreeViewItem = <T extends object>(props: TreeViewItemProps<T>) => {
231230
let content;
232231
let nestedRows;
233232
let {renderer} = useTreeRendererContext();
234-
let {isDetached} = useContext(InternalTreeContext);
233+
// let {isDetached} = useContext(InternalTreeContext);
235234
// TODO alternative api is that we have a separate prop for the TreeItems contents and expect the child to then be
236235
// a nested tree item
237236

@@ -266,7 +265,7 @@ export const TreeViewItem = <T extends object>(props: TreeViewItemProps<T>) => {
266265
isLink: !!href
267266
}) + (renderProps.isFocusVisible && ' ' + raw('&:before { content: ""; display: inline-block; position: sticky; inset-inline-start: 0; width: 3px; height: 100%; margin-inline-end: -3px; margin-block-end: 1px; z-index: 3; background-color: var(--rowFocusIndicatorColor)'))}>
268267
<UNSTABLE_TreeItemContent>
269-
{({isExpanded, hasChildRows, selectionMode, selectionBehavior, isDisabled, isSelected, isFocusVisible}) => (
268+
{({isExpanded, hasChildRows, selectionMode, selectionBehavior, isDisabled}) => (
270269
<div className={treeCellGrid({isDisabled})}>
271270
{selectionMode !== 'none' && selectionBehavior === 'toggle' && (
272271
// TODO: add transition?

packages/@react-spectrum/s2/stories/TreeView.stories.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212

1313
import {action} from '@storybook/addon-actions';
1414
import {categorizeArgTypes} from './utils';
15-
import FileTxt from '../s2wf-icons/S2_Icon_FileText_20_N.svg';
16-
// import Add from '../s2wf-icons/S2_Icon_Add_20_N.svg';
17-
// import Delete from '../s2wf-icons/S2_Icon_Delete_20_N.svg';
18-
// import Edit from '../s2wf-icons/S2_Icon_Edit_20_N.svg';
19-
import Folder from '../s2wf-icons/S2_Icon_Folder_20_N.svg';
20-
import type {Meta} from '@storybook/react';
21-
import React from 'react';
2215
import {
2316
Content,
2417
Heading,
@@ -30,7 +23,14 @@ import {
3023
TreeView,
3124
TreeViewItem
3225
} from '../src';
26+
// import Add from '../s2wf-icons/S2_Icon_Add_20_N.svg';
27+
// import Delete from '../s2wf-icons/S2_Icon_Delete_20_N.svg';
28+
// import Edit from '../s2wf-icons/S2_Icon_Edit_20_N.svg';
29+
import FileTxt from '../s2wf-icons/S2_Icon_FileText_20_N.svg';
30+
import Folder from '../s2wf-icons/S2_Icon_Folder_20_N.svg';
3331
import FolderOpen from '../spectrum-illustrations/linear/FolderOpen';
32+
import type {Meta} from '@storybook/react';
33+
import React from 'react';
3434

3535
let onActionFunc = action('onAction');
3636
let noOnAction = null;
@@ -252,4 +252,4 @@ export const Empty = {
252252
renderEmptyState,
253253
items: []
254254
}
255-
}
255+
};

0 commit comments

Comments
 (0)