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