From 1a1e5c2e1dcfc9647701525776ff67e3a7e441c7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 22 May 2024 01:07:58 -0300 Subject: [PATCH] Fix Flex component type --- src/webpack/common/components.ts | 2 +- src/webpack/common/types/components.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index adb5a9974..59304e275 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -46,7 +46,7 @@ export let useToken: t.useToken; export const MaskedLink = findComponent(filters.componentByCode("MASKED_LINK)")); export const Timestamp = findComponent(filters.componentByCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")); -export const Flex = findComponent(filters.byProps("Justify", "Align", "Wrap")); +export const Flex = findComponent(filters.byProps("Justify", "Align", "Wrap")) as t.Flex; export const OAuth2AuthorizeModal = findExportedComponent("OAuth2AuthorizeModal"); diff --git a/src/webpack/common/types/components.d.ts b/src/webpack/common/types/components.d.ts index c27168749..725d5f8be 100644 --- a/src/webpack/common/types/components.d.ts +++ b/src/webpack/common/types/components.d.ts @@ -327,7 +327,7 @@ export type Slider = ComponentType>; // TODO - type maybe idk probably not that useful other than the constants -export type FlexProps = PropsWithChildren & { +export type Flex = ComponentType> & { Align: Record<"START" | "END" | "CENTER" | "STRETCH" | "BASELINE", string>; Direction: Record<"VERTICAL" | "HORIZONTAL" | "HORIZONTAL_REVERSE", string>; Justify: Record<"START" | "END" | "CENTER" | "BETWEEN" | "AROUND", string>;