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>;