feat: add alignRight prop to IntegrationFilter and update HomePageClient
- Introduced alignRight prop in IntegrationFilter for dropdown alignment control. - Updated HomePageClient to pass alignRight as true, ensuring consistent dropdown positioning.
This commit is contained in:
@@ -73,6 +73,7 @@ function HomePageContent({ productivityMetrics, deadlineMetrics, tagMetrics }: {
|
|||||||
onSourcesChange={setSelectedSources}
|
onSourcesChange={setSelectedSources}
|
||||||
hiddenSources={hiddenSources}
|
hiddenSources={hiddenSources}
|
||||||
onHiddenSourcesChange={setHiddenSources}
|
onHiddenSourcesChange={setHiddenSources}
|
||||||
|
alignRight={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ interface IntegrationFilterProps {
|
|||||||
onSourcesChange?: (sources: string[]) => void;
|
onSourcesChange?: (sources: string[]) => void;
|
||||||
hiddenSources?: string[];
|
hiddenSources?: string[];
|
||||||
onHiddenSourcesChange?: (sources: string[]) => void;
|
onHiddenSourcesChange?: (sources: string[]) => void;
|
||||||
|
|
||||||
|
// Alignement du dropdown
|
||||||
|
alignRight?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SourceOption {
|
interface SourceOption {
|
||||||
@@ -32,7 +35,8 @@ export function IntegrationFilter({
|
|||||||
selectedSources,
|
selectedSources,
|
||||||
onSourcesChange,
|
onSourcesChange,
|
||||||
hiddenSources,
|
hiddenSources,
|
||||||
onHiddenSourcesChange
|
onHiddenSourcesChange,
|
||||||
|
alignRight = false
|
||||||
}: IntegrationFilterProps) {
|
}: IntegrationFilterProps) {
|
||||||
const { regularTasks, pinnedTasks } = useTasksContext();
|
const { regularTasks, pinnedTasks } = useTasksContext();
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
@@ -263,8 +267,8 @@ export function IntegrationFilter({
|
|||||||
trigger={`🔗 ${getMainButtonText()}`}
|
trigger={`🔗 ${getMainButtonText()}`}
|
||||||
variant={getMainButtonVariant()}
|
variant={getMainButtonVariant()}
|
||||||
content={dropdownContent}
|
content={dropdownContent}
|
||||||
placement="bottom-start"
|
placement={alignRight ? "bottom-end" : "bottom-start"}
|
||||||
className="min-w-[240px]"
|
className={`min-w-[240px] ${alignRight ? "transform -translate-x-full" : ""}`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user