Skip to content

Commit 4533fef

Browse files
Renamed dropdown to KernDropdown and remove old Dropdown (#23)
1 parent 4c702e0 commit 4533fef

File tree

5 files changed

+9
-300
lines changed

5 files changed

+9
-300
lines changed

components/Dropdown.tsx

Lines changed: 0 additions & 291 deletions
This file was deleted.

components/Dropdown2.tsx renamed to components/KernDropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Fragment, useEffect, useRef, useState } from 'react'
22
import { Menu, Transition } from '@headlessui/react'
3-
import { DropdownProps } from '../types/dropdown';
3+
import { KernDropdownProps } from '../types/dropdown';
44
import { combineClassNames } from '../../javascript-functions/general';
55
import { SELECT_ALL, checkDropdownProps, getActiveNegateGroupColor, getDropdownDisplayText, prepareDropdownOptionsToArray, reduceColorProperty, setOptionsWithSearchBar } from '../helpers/dropdown-helper';
66
import { Tooltip } from '@nextui-org/react';
@@ -12,7 +12,7 @@ import { useDefaults } from '../hooks/useDefaults';
1212

1313
const DEFAULTS = { fontSizeClass: 'text-xs' };
1414

15-
export default function Dropdown2(props: DropdownProps) {
15+
export default function KernDropdown(props: KernDropdownProps) {
1616
const isDisabled = props.disabled || props.options.length == 0;
1717

1818
const [dropdownCaptions, setDropdownCaptions] = useState<any[]>([]);

components/LocalStorageDropdown.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//wrapper around Dropdown to + input filed to read local storage data and provide it as dropdown options
1+
//wrapper around KernDropdown to + input filed to read local storage data and provide it as dropdown options
22

33
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
44
import { useDefaults, useDefaultsByRef } from "../hooks/useDefaults";
55
import { CompareOptions, inStringList } from "@/submodules/javascript-functions/validations";
66
import { LOCAL_STORAGE_DROPDOWN_DEFAULTS, LocalStorageDropdownProps } from "../types/localStorageDropdown";
7-
import Dropdown2 from "./Dropdown2";
7+
import KernDropdown from "./KernDropdown";
88

99

1010
function readFromLocalStorage(group: string, key: string): string[] {
@@ -102,7 +102,7 @@ export const LocalStorageDropdown = forwardRef((_props: LocalStorageDropdownProp
102102

103103
return <>
104104
{options.length > 0 ?
105-
<Dropdown2
105+
<KernDropdown
106106
buttonName={props.buttonName ?? 'Select'}
107107
searchDefaultValue={props.searchDefaultValue}
108108
options={options}

0 commit comments

Comments
 (0)