Skip to content

Commit

Permalink
Rename to InlineLabelSelect to clarify what component is and differ…
Browse files Browse the repository at this point in the history
…ence from `CustomSelectControl`
  • Loading branch information
Jinksi committed Jun 7, 2024
1 parent a19f745 commit c84c9a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ const stateReducer = (
};

/**
* FilterSelectControl component.
* InlineLabelSelect component.
* A select control with a list of options, inline label, and option hints.
*/
function FilterSelectControl< ItemType extends SelectItem >( {
function InlineLabelSelect< ItemType extends SelectItem >( {
name,
className,
label,
Expand Down Expand Up @@ -247,4 +247,4 @@ function FilterSelectControl< ItemType extends SelectItem >( {
);
}

export default FilterSelectControl;
export default InlineLabelSelect;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`FilterSelectControl renders options 1`] = `
exports[`InlineLabelSelect renders options 1`] = `
<div>
<div
class="wcpay-filter components-custom-select-control onboarding-select-control"
Expand Down Expand Up @@ -130,7 +130,7 @@ exports[`FilterSelectControl renders options 1`] = `
</div>
`;

exports[`FilterSelectControl renders options with custom children 1`] = `
exports[`InlineLabelSelect renders options with custom children 1`] = `
<div>
<div
class="wcpay-filter components-custom-select-control onboarding-select-control"
Expand Down Expand Up @@ -182,7 +182,7 @@ exports[`FilterSelectControl renders options with custom children 1`] = `
</div>
`;

exports[`FilterSelectControl renders with placeholder 1`] = `
exports[`InlineLabelSelect renders with placeholder 1`] = `
<div>
<div
class="wcpay-filter components-custom-select-control onboarding-select-control"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import user from '@testing-library/user-event';
/**
* Internal dependencies
*/
import FilterSelectControl from '..';
import InlineLabelSelect from '..';

interface Item {
key: string;
Expand Down Expand Up @@ -39,10 +39,10 @@ const options: Item[] = [
},
];

describe( 'FilterSelectControl', () => {
describe( 'InlineLabelSelect', () => {
test( 'renders options', () => {
const { container, getByText } = render(
<FilterSelectControl
<InlineLabelSelect
className="onboarding-select-control"
label="Currency"
value={ options[ 0 ] }
Expand All @@ -62,7 +62,7 @@ describe( 'FilterSelectControl', () => {

test( 'renders options with custom children', () => {
const { container, getByText } = render(
<FilterSelectControl
<InlineLabelSelect
className="onboarding-select-control"
label="Currency"
value={ undefined }
Expand All @@ -89,7 +89,7 @@ describe( 'FilterSelectControl', () => {

test( 'renders with placeholder', () => {
const { container } = render(
<FilterSelectControl
<InlineLabelSelect
className="onboarding-select-control"
label="Currency"
value={ undefined }
Expand Down

0 comments on commit c84c9a5

Please sign in to comment.