mirror of
https://github.com/outline/outline.git
synced 2026-12-03 18:10:36 +03:00
separator should go all the way
This commit is contained in:
1 parent
39aa18e7da
commit
c76afa1252
3 files changed
+11
-5
No files matched your search
@@ -3,12 +3,12 @@ import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import { depths, s } from "@shared/styles";
|
||||
import { Props as ButtonProps } from "~/components/Button";
|
||||
import Separator from "~/components/ContextMenu/Separator";
|
||||
import { fadeAndSlideDown, fadeAndSlideUp } from "~/styles/animations";
|
||||
import {
|
||||
SelectItemIndicator,
|
||||
SelectItem as SelectItemWrapper,
|
||||
SelectButton,
|
||||
SelectSeparator,
|
||||
} from "./components/InputSelect";
|
||||
|
||||
/** Root InputSelect component - all the other components are rendered inside it. */
|
||||
@@ -57,7 +57,9 @@ const InputSelectContent = React.forwardRef<
|
||||
return (
|
||||
<InputSelectPrimitive.Portal>
|
||||
<StyledContent ref={ref} position={"popper"} {...rest}>
|
||||
<InputSelectPrimitive.Viewport style={{ overscrollBehavior: "none" }}>
|
||||
<InputSelectPrimitive.Viewport
|
||||
style={{ overflow: "inherit", overscrollBehavior: "none" }}
|
||||
>
|
||||
{children}
|
||||
</InputSelectPrimitive.Viewport>
|
||||
</StyledContent>
|
||||
@@ -93,8 +95,8 @@ const InputSelectSeparator = React.forwardRef<
|
||||
React.ElementRef<typeof InputSelectPrimitive.Separator>,
|
||||
React.ComponentPropsWithoutRef<typeof InputSelectPrimitive.Separator>
|
||||
>((props, ref) => (
|
||||
<InputSelectPrimitive.Separator ref={ref} asChild>
|
||||
<Separator {...props} />
|
||||
<InputSelectPrimitive.Separator ref={ref} {...props} asChild>
|
||||
<SelectSeparator />
|
||||
</InputSelectPrimitive.Separator>
|
||||
));
|
||||
InputSelectSeparator.displayName = InputSelectPrimitive.Separator.displayName;
|
||||
|
||||
@@ -130,6 +130,10 @@ const ItemContainer = styled(Flex)`
|
||||
`}
|
||||
`;
|
||||
|
||||
export const SelectSeparator = styled.hr`
|
||||
margin: 4px -4px; // negative margin to offset content's padding
|
||||
`;
|
||||
|
||||
const IndicatorContainer = styled.span`
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
||||
@@ -92,7 +92,7 @@ export const MenuSubTrigger = styled.div<BaseMenuItemProps>`
|
||||
`;
|
||||
|
||||
export const MenuSeparator = styled.hr`
|
||||
margin: 6px 0;
|
||||
margin: 4px -6px; // negative margin to offset content's padding
|
||||
`;
|
||||
|
||||
export const MenuLabel = styled.div`
|
||||
|
||||
Reference in new issue
Block a user