mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Set all popovers withinPortal by default
This commit is contained in:
@@ -12,7 +12,7 @@ interface DatePickerProps extends MantineDatePickerProps {
|
||||
const StyledDatePicker = styled(MantineDatePicker)<DatePickerProps>``;
|
||||
|
||||
export const DatePicker = ({ width, maxWidth, ...props }: DatePickerProps) => {
|
||||
return <StyledDatePicker {...props} sx={{ maxWidth, width }} />;
|
||||
return <StyledDatePicker withinPortal {...props} sx={{ maxWidth, width }} />;
|
||||
};
|
||||
|
||||
DatePicker.defaultProps = {
|
||||
|
||||
@@ -45,7 +45,11 @@ const StyledMenuDivider = styled(MantineMenu.Divider)`
|
||||
`;
|
||||
|
||||
export const DropdownMenu = ({ children, ...props }: MenuProps) => {
|
||||
return <StyledMenu {...props}>{children}</StyledMenu>;
|
||||
return (
|
||||
<StyledMenu withinPortal {...props}>
|
||||
{children}
|
||||
</StyledMenu>
|
||||
);
|
||||
};
|
||||
|
||||
const MenuLabel = ({ children, ...props }: MenuLabelProps) => {
|
||||
|
||||
@@ -5,15 +5,17 @@ import {
|
||||
} from '@mantine/core';
|
||||
|
||||
interface SelectProps extends MantineSelectProps {
|
||||
maxWidth?: number | string;
|
||||
width?: number | string;
|
||||
}
|
||||
|
||||
const StyledSelect = styled(MantineSelect)``;
|
||||
|
||||
export const Select = ({ width, ...props }: SelectProps) => {
|
||||
return <StyledSelect {...props} sx={{ width }} />;
|
||||
export const Select = ({ width, maxWidth, ...props }: SelectProps) => {
|
||||
return <StyledSelect withinPortal {...props} sx={{ maxWidth, width }} />;
|
||||
};
|
||||
|
||||
Select.defaultProps = {
|
||||
maxWidth: undefined,
|
||||
width: undefined,
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ const StyledTooltip = styled(MantineTooltip)`
|
||||
export const Tooltip = ({ children, ...rest }: TooltipProps) => {
|
||||
return (
|
||||
<StyledTooltip
|
||||
withinPortal
|
||||
pl={10}
|
||||
pr={10}
|
||||
py={5}
|
||||
|
||||
Reference in New Issue
Block a user