mirror of https://github.com/buster-so/buster.git
Update new settings components
This commit is contained in:
parent
30f1315908
commit
8a95ff8d30
|
@ -1,6 +1,5 @@
|
||||||
import { SlackIntegrations } from '@/components/features/integrations/SlackIntegrations';
|
import { SlackIntegrations } from '@/components/features/integrations/SlackIntegrations';
|
||||||
import { SettingsPageHeader } from '@/components/features/settings';
|
import { SettingsPageHeader } from '@/components/features/settings';
|
||||||
import { SettingsCards } from '@/components/features/settings';
|
|
||||||
|
|
||||||
export default function IntegrationsPage() {
|
export default function IntegrationsPage() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -107,7 +107,7 @@ const SelectItemComponent = React.memo(
|
||||||
|
|
||||||
SelectItemComponent.displayName = 'SelectItemComponent';
|
SelectItemComponent.displayName = 'SelectItemComponent';
|
||||||
|
|
||||||
export function Select<T = string>({
|
function SelectComponent<T = string>({
|
||||||
items,
|
items,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
onChange,
|
onChange,
|
||||||
|
@ -121,7 +121,7 @@ export function Select<T = string>({
|
||||||
defaultValue,
|
defaultValue,
|
||||||
dataTestId,
|
dataTestId,
|
||||||
loading = false,
|
loading = false,
|
||||||
search = true,
|
search = false,
|
||||||
clearable = false
|
clearable = false
|
||||||
}: SelectProps<T>) {
|
}: SelectProps<T>) {
|
||||||
const [internalOpen, setInternalOpen] = React.useState(false);
|
const [internalOpen, setInternalOpen] = React.useState(false);
|
||||||
|
@ -363,11 +363,11 @@ export function Select<T = string>({
|
||||||
<CommandInput
|
<CommandInput
|
||||||
value={searchValue}
|
value={searchValue}
|
||||||
onValueChange={setSearchValue}
|
onValueChange={setSearchValue}
|
||||||
parentClassName="swag sr-only hidden h-0 border-0 p-0"
|
parentClassName="sr-only hidden h-0 border-0 p-0"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<div className="scrollbar-hide max-h-[300px] overflow-y-auto">
|
<div className="scrollbar-hide max-h-[300px] overflow-y-auto">
|
||||||
<CommandList>
|
<CommandList className="p-1">
|
||||||
<CommandEmpty>{emptyMessage}</CommandEmpty>
|
<CommandEmpty>{emptyMessage}</CommandEmpty>
|
||||||
{renderedItems}
|
{renderedItems}
|
||||||
</CommandList>
|
</CommandList>
|
||||||
|
@ -377,3 +377,5 @@ export function Select<T = string>({
|
||||||
</PopoverRoot>
|
</PopoverRoot>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const Select = React.memo(SelectComponent) as typeof SelectComponent;
|
||||||
|
|
Loading…
Reference in New Issue