mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
Fixes For Merge
This commit is contained in:
parent
a522db9e40
commit
f0229d6185
3 changed files with 12 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
||||||
import { Text, Tooltip } from "@webpack/common";
|
import { Text, Tooltip } from "@webpack/common";
|
||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
|
|
||||||
|
import { buttonRef } from "./BuilderColorButton";
|
||||||
|
|
||||||
export interface BuilderButtonProps {
|
export interface BuilderButtonProps {
|
||||||
label?: string | undefined;
|
label?: string | undefined;
|
||||||
tooltip?: string | undefined;
|
tooltip?: string | undefined;
|
||||||
|
@ -32,6 +34,7 @@ export const BuilderButton = ({ label, tooltip, selectedStyle, buttonProps }: Bu
|
||||||
borderRadius: "4px",
|
borderRadius: "4px",
|
||||||
cursor: "pointer"
|
cursor: "pointer"
|
||||||
}}
|
}}
|
||||||
|
ref={buttonRef}
|
||||||
>
|
>
|
||||||
{!selectedStyle && (
|
{!selectedStyle && (
|
||||||
<svg
|
<svg
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Popout } from "@webpack/common";
|
import { Popout, useRef } from "@webpack/common";
|
||||||
|
|
||||||
import { BuilderButton, type BuilderButtonProps, CustomColorPicker, type CustomColorPickerProps } from ".";
|
import { BuilderButton, type BuilderButtonProps, CustomColorPicker, type CustomColorPickerProps } from ".";
|
||||||
|
|
||||||
|
@ -13,9 +13,12 @@ export interface BuilderColorButtonProps extends Pick<BuilderButtonProps, "label
|
||||||
setColor: (color: number | null) => void;
|
setColor: (color: number | null) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const buttonRef = useRef(null);
|
||||||
|
|
||||||
export const BuilderColorButton = ({ label, color, setColor, suggestedColors }: BuilderColorButtonProps) => (
|
export const BuilderColorButton = ({ label, color, setColor, suggestedColors }: BuilderColorButtonProps) => (
|
||||||
<Popout
|
<Popout
|
||||||
position="bottom"
|
position="bottom"
|
||||||
|
targetElementRef={buttonRef}
|
||||||
renderPopout={() => (
|
renderPopout={() => (
|
||||||
<CustomColorPicker
|
<CustomColorPicker
|
||||||
value={color}
|
value={color}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import { classes } from "@utils/misc";
|
import { classes } from "@utils/misc";
|
||||||
import { findByCode } from "@webpack";
|
import { findByCode } from "@webpack";
|
||||||
import { Button, Clickable, Menu, Popout, React } from "@webpack/common";
|
import { Button, Clickable, Menu, Popout, React, useRef } from "@webpack/common";
|
||||||
|
|
||||||
import { SvgOverFlowIcon } from "../icons/overFlowIcon";
|
import { SvgOverFlowIcon } from "../icons/overFlowIcon";
|
||||||
|
|
||||||
|
@ -101,6 +101,8 @@ export function NoteBookTabs({ tabs, selectedTabId, onSelectTab }: { tabs: strin
|
||||||
);
|
);
|
||||||
}, [tabs, selectedTabId, onSelectTab, overflowedTabs]);
|
}, [tabs, selectedTabId, onSelectTab, overflowedTabs]);
|
||||||
|
|
||||||
|
const buttonRef = useRef(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classes("vc-notebook-tabbar")}
|
className={classes("vc-notebook-tabbar")}
|
||||||
|
@ -137,9 +139,11 @@ export function NoteBookTabs({ tabs, selectedTabId, onSelectTab }: { tabs: strin
|
||||||
position="bottom"
|
position="bottom"
|
||||||
align="right"
|
align="right"
|
||||||
spacing={0}
|
spacing={0}
|
||||||
|
targetElementRef={buttonRef}
|
||||||
>
|
>
|
||||||
{props => (
|
{props => (
|
||||||
<Button
|
<Button
|
||||||
|
ref={buttonRef}
|
||||||
{...props}
|
{...props}
|
||||||
className={"vc-notebook-overflow-chevron"}
|
className={"vc-notebook-overflow-chevron"}
|
||||||
size={Button.Sizes.ICON}
|
size={Button.Sizes.ICON}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue