Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
tewarig committed Feb 27, 2025
1 parent 18a8f81 commit 2886eac
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions packages/blade/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const validDropdownChildren = [
dropdownComponentIds.DropdownOverlay,
dropdownComponentIds.triggers.AutoComplete,
bottomSheetComponentIds.BottomSheet,
dropdownComponentIds.triggers.DropdownFilterChip,
dropdownComponentIds.triggers.FilterChipSelectInput,
];

/**
Expand Down Expand Up @@ -162,8 +162,8 @@ const _Dropdown = (
if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {
dropdownTriggerer.current = 'AutoComplete';
}
if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownFilterChip)) {
dropdownTriggerer.current = 'DropdownFilterChip';
if (isValidAllowedChildren(child, dropdownComponentIds.triggers.FilterChipSelectInput)) {
dropdownTriggerer.current = 'FilterChipSelectInput';
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BaseFilterChip } from '~components/FilterChip/BaseFilterChip';
import { getActionListContainerRole } from '~components/ActionList/getA11yRoles';
import type { BaseFilterChipProps } from '~components/FilterChip/types';

type DropdownFilterChipProps = Pick<
type FilterChipSelectInput = Pick<
BaseFilterChipProps,
| 'onKeyDown'
| 'value'
Expand All @@ -23,7 +23,7 @@ type DropdownFilterChipProps = Pick<
accessibilityLabel?: string;
};

const _DropdownFilterChip = ({
const _FilterChipSelectInput = ({
onClick,
onBlur,
onKeyDown,
Expand All @@ -33,7 +33,7 @@ const _DropdownFilterChip = ({
onClearButtonClick,
label,
...rest
}: DropdownFilterChipProps): React.ReactElement => {
}: FilterChipSelectInput): React.ReactElement => {
const {
onTriggerClick,
onTriggerKeydown,
Expand Down Expand Up @@ -79,8 +79,8 @@ const _DropdownFilterChip = ({
);
};

const DropdownFilterChip = assignWithoutSideEffects(_DropdownFilterChip, {
componentId: dropdownComponentIds.triggers.DropdownFilterChip,
const FilterChipSelectInput = assignWithoutSideEffects(_FilterChipSelectInput, {
componentId: dropdownComponentIds.triggers.FilterChipSelectInput,
});

export { DropdownFilterChip };
export { FilterChipSelectInput };
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { DropdownButton } from '../DropdownButton';
import { Dropdown, DropdownOverlay } from '..';
import { DropdownFilterChip } from '../DropdownFilterChip';
import { FilterChipSelectInput } from '../FilterChipSelectInput';
import { ActionList, ActionListItem } from '~components/ActionList';

const DropdownStoryMeta = {
Expand All @@ -28,7 +28,7 @@ export const Default = (): React.ReactElement => {

return (
<Dropdown>
<DropdownFilterChip
<FilterChipSelectInput
label="Filter"
value={value}
onClearButtonClick={() => {
Expand Down Expand Up @@ -83,7 +83,7 @@ export const SelectionTypeMultiple = (): React.ReactElement => {
const isSelected = (name: string): boolean => value.includes(name);
return (
<Dropdown selectionType="multiple">
<DropdownFilterChip
<FilterChipSelectInput
label="Filter Chip"
value={value}
onClearButtonClick={(value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const dropdownComponentIds = {
AutoComplete: 'AutoComplete',
SearchInput: 'SearchInput',
DropdownIconButton: 'DropdownIconButton',
DropdownFilterChip: 'DropdownFilterChip',
FilterChipSelectInput: 'FilterChipSelectInput',
},
};
2 changes: 1 addition & 1 deletion packages/blade/src/components/Dropdown/useDropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type DropdownContextType = {
| 'AutoComplete'
| 'DropdownLink'
| 'SearchInput'
| 'DropdownFilterChip';
| 'FilterChipSelectInput';

/** ref of triggerer. Used to call focus in certain places */
triggererRef: React.MutableRefObject<HTMLButtonElement | null>;
Expand Down

0 comments on commit 2886eac

Please sign in to comment.