Skip to content

Commit

Permalink
fix: mobile dropdown token selection issue (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayological authored Sep 17, 2024
1 parent f3ebf0a commit 4942c1d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Prevent Non-Release/Non-Hotfix PRs to Main

on:
pull_request:
branches:
- main
pull_request_target:
branches:
- main

jobs:
check-target-branch:
if: github.base_ref == 'main'
runs-on: ubuntu-latest
steps:
- name: Check if the source branch is a release branch
run: |
if [[ "${{ github.head_ref }}" != release/* && "${{ github.head_ref }}" != hotfix/* ]]; then
echo "Only release and hotfix branches can be merged into the main branch."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: ci
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
branches: [main, dev]
pull_request:
branches: [main]
branches: [main, dev]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function Select({ value, optionValues, onChange, button, option, buttonLa
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<Listbox.Options className="absolute z-20 w-full py-1 mt-1 overflow-auto dark:bg-[#3F3F46] bg-white rounded-[8px] shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none border border-solid border-black">
<Listbox.Options className="absolute z-20 w-full py-1 mt-1 overflow-auto dark:bg-[#3F3F46] bg-white rounded-[8px] shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none border border-solid border-black sm:mobile-dropdown dropdown-menu">
{optionValues.map((optionValue) => (
<Listbox.Option
key={optionValue}
Expand Down
11 changes: 11 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,14 @@ Toasts
--toastify-color-progress-warning: var(--toastify-color-warning);
--toastify-color-progress-error: var(--toastify-color-error);
}

@media (max-width: 640px) {
.dropdown-menu {
position: fixed !important;
bottom: auto !important;
top: auto !important;
max-height: 25vh !important;
width: 48% !important;
z-index: 9999 !important;
}
}

0 comments on commit 4942c1d

Please sign in to comment.