refactor: Change srLabel to label
This commit is contained in:
@@ -19,7 +19,7 @@ export type DropdownItem = {
|
|||||||
|
|
||||||
type DropdownProps = {
|
type DropdownProps = {
|
||||||
id: string;
|
id: string;
|
||||||
srLabel: string;
|
label: string;
|
||||||
items: DropdownItem[];
|
items: DropdownItem[];
|
||||||
defaultValue: string;
|
defaultValue: string;
|
||||||
onChange: (value: string) => void;
|
onChange: (value: string) => void;
|
||||||
@@ -58,7 +58,7 @@ const CustomDropdownButton: FunctionComponent<ListboxButtonProps> = ({
|
|||||||
|
|
||||||
export const Dropdown: FunctionComponent<DropdownProps> = ({
|
export const Dropdown: FunctionComponent<DropdownProps> = ({
|
||||||
id,
|
id,
|
||||||
srLabel,
|
label,
|
||||||
items,
|
items,
|
||||||
defaultValue,
|
defaultValue,
|
||||||
onChange,
|
onChange,
|
||||||
@@ -74,7 +74,7 @@ export const Dropdown: FunctionComponent<DropdownProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<VisuallyHidden id={labelId}>{srLabel}</VisuallyHidden>
|
<VisuallyHidden id={labelId}>{label}</VisuallyHidden>
|
||||||
<ListboxInput
|
<ListboxInput
|
||||||
value={value}
|
value={value}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
|||||||
Reference in New Issue
Block a user