Skip to content

Commit f86c071

Browse files
committed
Linting and portal
1 parent 34769e7 commit f86c071

File tree

16 files changed

+314
-302
lines changed

16 files changed

+314
-302
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import SelectContent from "./fragments/SelectContent";
2-
import SelectItem from "./fragments/SelectItem";
3-
import SelectTrigger from "./fragments/SelectTrigger";
4-
import SelectRoot from "./fragments/SelectRoot";
1+
import SelectContent from './fragments/SelectContent';
2+
import SelectItem from './fragments/SelectItem';
3+
import SelectTrigger from './fragments/SelectTrigger';
4+
import SelectRoot from './fragments/SelectRoot';
55
// import SelectGroup from "./fragments/SelectGroup";
66
// import SelectSeparator from "./fragments/SelectSeparator";
77

88
const Select = () => {
99
console.warn('Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead.');
1010
return null;
11-
}
11+
};
1212

1313
Select.Root = SelectRoot;
1414
Select.Content = SelectContent;
@@ -17,4 +17,4 @@ Select.Trigger = SelectTrigger;
1717
// Select.Group = SelectGroup;
1818
// Select.Separator = SelectSeparator;
1919

20-
export default Select
20+
export default Select;

src/components/ui/Select/fragments/SelectContent.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@ import { customClassSwitcher } from '~/core/customClassSwitcher';
44

55
const COMPONENT_NAME = 'Select';
66

7-
function SelectContent({ customRootClass, children, position = "popper", ...props }: any) {
7+
function SelectContent({ customRootClass, children, position = 'popper', ...props }: any) {
88
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
99
return (
10-
<SelectPrimitive.Content
11-
className={`${rootClass}-content`}
10+
<SelectPrimitive.Content
11+
className={`${rootClass}-content`}
1212
position={position}
1313
data-position={position}
14-
14+
1515
{...props}
1616
>
1717

18-
19-
20-
{children}
18+
{children}
2119
</SelectPrimitive.Content>
2220
);
2321
}
2422

25-
export default SelectContent;
23+
export default SelectContent;

src/components/ui/Select/fragments/SelectItem.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const COMPONENT_NAME = 'Select';
77
function SelectItem({ customRootClass, children, value, disabled, ...props }: any) {
88
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
99
return (
10-
<SelectPrimitive.Item
11-
className={`${rootClass}-item`}
12-
value={value}
10+
<SelectPrimitive.Item
11+
className={`${rootClass}-item`}
12+
value={value}
1313
disabled={disabled}
1414
data-disabled={disabled ? '' : undefined}
1515
role="option"
@@ -26,4 +26,4 @@ function SelectItem({ customRootClass, children, value, disabled, ...props }: an
2626
);
2727
}
2828

29-
export default SelectItem;
29+
export default SelectItem;
Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
import React, { useState, useCallback } from 'react';
22
import SelectPrimitive from '~/core/primitives/Select/Select';
3-
import {customClassSwitcher} from '~/core/customClassSwitcher';
3+
import { customClassSwitcher } from '~/core/customClassSwitcher';
44

55
const COMPONENT_NAME = 'Select';
66

7-
8-
97
function SelectRoot({ customRootClass, children, defaultValue, value, onValueChange, ...props }: any) {
108
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
11-
12-
13-
9+
1410
return (
15-
16-
<SelectPrimitive.Root
17-
className={`${rootClass}-root`}
18-
defaultValue={defaultValue}
19-
value={value}
20-
onValueChange={onValueChange}
21-
{...props}
22-
>
23-
{children}
24-
</SelectPrimitive.Root>
25-
11+
12+
<SelectPrimitive.Root
13+
className={`${rootClass}-root`}
14+
defaultValue={defaultValue}
15+
value={value}
16+
onValueChange={onValueChange}
17+
{...props}
18+
>
19+
{children}
20+
</SelectPrimitive.Root>
21+
2622
);
2723
}
2824

29-
export default SelectRoot;
25+
export default SelectRoot;

src/components/ui/Select/fragments/SelectTrigger.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ const COMPONENT_NAME = 'Select';
77
function SelectTrigger({ customRootClass, children, disabled, placeholder, ...props }: any) {
88
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
99
return (
10-
<SelectPrimitive.Trigger
11-
className={`${rootClass}-trigger`}
10+
<SelectPrimitive.Trigger
11+
className={`${rootClass}-trigger`}
1212
aria-disabled={disabled ? 'true' : undefined}
1313
data-placeholder={placeholder ? '' : undefined}
1414
{...props}
1515
>
16-
17-
{children}
18-
16+
17+
{children}
18+
1919
</SelectPrimitive.Trigger>
2020
);
2121
}
2222

23-
export default SelectTrigger;
23+
export default SelectTrigger;

0 commit comments

Comments
 (0)