Skip to content

Commit

Permalink
Merge pull request #2461 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Apr 29, 2024
2 parents 6110c1a + f746ef1 commit 7a802a2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/[locale]/settings/personal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Personal = () => {
</Link>
<Accordian
title={t('pages.settingsPersonal.HEADING_TITLE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="general"
>
{/* <Text className="text-base font-normal text-center text-gray-400 sm:text-left">
Expand Down
12 changes: 6 additions & 6 deletions apps/web/app/[locale]/settings/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Team = () => {
{/* General Settings */}
<Accordian
title={t('pages.settingsTeam.HEADING_TITLE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="general-settings"
>
<div className="flex flex-col">
Expand All @@ -47,7 +47,7 @@ const Team = () => {
{isTeamManager ? (
<Accordian
title={t('pages.settingsTeam.INVITATION_HEADING_TITLE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="invitations"
>
<InvitationSetting />
Expand All @@ -58,7 +58,7 @@ const Team = () => {
{isTeamManager ? (
<Accordian
title={t('pages.settingsTeam.MEMBER_HEADING_TITLE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="member"
>
<MemberSetting />
Expand All @@ -68,7 +68,7 @@ const Team = () => {
{isTeamManager && (
<Accordian
title={t('pages.settingsTeam.INTEGRATIONS')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="integrations"
>
<IntegrationSetting />
Expand All @@ -78,7 +78,7 @@ const Team = () => {
{/* Issues Settings */}
<Accordian
title={t('pages.settingsTeam.ISSUES_HEADING_TITLE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
id="issues-settings"
>
<IssuesSettings />
Expand All @@ -96,7 +96,7 @@ const Team = () => {
{/* Danger Zone */}
<Accordian
title={t('pages.settings.DANDER_ZONE')}
className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme"
className="w-full max-w-[96vw] p-4 mt-8 dark:bg-dark--theme"
isDanger={true}
id="danger-zones"
>
Expand Down
22 changes: 19 additions & 3 deletions apps/web/lib/components/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Card } from './card';
import { SpinnerLoader } from './loader';
import { useTranslations } from 'next-intl';
import { ScrollArea } from '@components/ui/scroll-bar';

export type DropdownItem<D = Record<string | number | symbol, any>> = {
key: React.Key;
Label: (props: { active?: boolean; selected?: boolean }) => JSX.Element;
Expand Down Expand Up @@ -49,16 +48,31 @@ export function Dropdown<T extends DropdownItem>({
setSearchText
}: Props<T>) {
const t = useTranslations();
const [open, setOpen] = React.useState(false);
return (
<div className={clsxm('rounded-xl', className)}>
<Listbox value={Value} onChange={onChange} disabled={publicTeam}>
{open && (
<div
onClick={() => setOpen(false)}
className="h-screen w-screen absolute bg-transparent top-0 left-0"
></div>
)}
<Listbox
value={Value}
onChange={(e: T) => {
onChange && onChange(e);
setOpen(false);
}}
disabled={publicTeam}
>
<Listbox.Button
className={clsxm(
'input-border',
'w-full flex justify-between rounded-xl px-3 py-2 text-sm items-center',
'font-normal outline-none',
buttonClassName
)}
onClick={() => setOpen(!open)}
style={buttonStyle}
>
<div title={Value?.itemTitle} className="w-full overflow-hidden text-ellipsis whitespace-nowrap">
Expand All @@ -72,7 +86,8 @@ export function Dropdown<T extends DropdownItem>({
) : !publicTeam ? (
<ChevronDownIcon
className={clsxm(
'ml-2 h-5 w-5 dark:text-white transition duration-150 ease-in-out group-hover:text-opacity-80'
'ml-2 h-5 w-5 dark:text-white transition duration-150 ease-in-out group-hover:text-opacity-80',
open && 'transform rotate-180'
)}
aria-hidden="true"
/>
Expand All @@ -89,6 +104,7 @@ export function Dropdown<T extends DropdownItem>({
leaveFrom="transform scale-100 opacity-100"
leaveTo="transform scale-95 opacity-0"
className={clsxm('absolute z-40')}
show={open}
>
<Listbox.Options
className={clsxm(
Expand Down
6 changes: 3 additions & 3 deletions apps/web/lib/settings/table-action-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const TableActionPopover = ({ member, handleEdit }: Props) => {
// setIsOpen(!isOpen);
// };
return (
<Popover className="w-full no-underline border-none">
<Popover className="w-full relative no-underline border-none">
{() => (
<>
<Transition
Expand All @@ -45,7 +45,7 @@ export const TableActionPopover = ({ member, handleEdit }: Props) => {
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="z-10 absolute right-16 bg-white rounded-2xl w-[7.5rem] flex flex-col pl-5 pr-5 pt-2 pb-2 shadow-xlcard dark:bg-[#1B1D22] dark:border dark:border-[#FFFFFF33]">
<Popover.Panel className="z-10 absolute right-10 bg-white rounded-2xl w-[7.5rem] flex flex-col pl-5 pr-5 pt-2 pb-2 shadow-xlcard dark:bg-[#1B1D22] dark:border dark:border-[#FFFFFF33]">
{/* TODO Dynamic */}
{/* Edit */}
<div
Expand Down Expand Up @@ -93,7 +93,7 @@ export const TableActionPopover = ({ member, handleEdit }: Props) => {
</Popover.Panel>
</Transition>
<Popover.Button className="w-full mt-2 outline-none">
<ThreeCircleOutlineHorizontalIcon className="w-6 text-[#292D32] dark:text-white" strokeWidth="2.5" />
<ThreeCircleOutlineHorizontalIcon className="w-6 text-[#292D32] relative dark:text-white" strokeWidth="2.5" />
</Popover.Button>
<ConfirmationModal
open={isOpen}
Expand Down

0 comments on commit 7a802a2

Please sign in to comment.