Skip to content

Commit

Permalink
chore: fix width issues for dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
aizad-deriv committed Jul 11, 2024
1 parent 83dbde7 commit 46548d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/Dropdown/Dropdown.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.deriv-dropdown {
width: 100%;
display: inline-block;
position: relative;
cursor: pointer;

Expand All @@ -11,6 +11,10 @@
}
}

&--full {
width: 100%;
}

&__button {
display: flex;
align-items: center;
Expand All @@ -19,10 +23,10 @@
}

&__chevron {
transition: all 0.3s ease-in-out;
transition: all 0.2s ease-in-out;

&--open {
transform: rotate(-180deg);
transform: rotate(180deg);
}

&--disabled {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const Dropdown = ({
<div
className={clsx("deriv-dropdown", {
"deriv-dropdown--disabled": disabled,
"deriv-dropdown--full": isFullWidth,
})}
{...getToggleButtonProps()}
>
Expand Down Expand Up @@ -169,6 +170,7 @@ export const Dropdown = ({
}
type="text"
value={value}
isFullWidth={isFullWidth}
{...getInputProps()}
{...rest}
/>
Expand Down

0 comments on commit 46548d3

Please sign in to comment.