fix tooltip component check (#541)

This commit is contained in:
megumin 2023-02-27 21:19:01 +00:00 committed by GitHub
parent 128ee41252
commit 335a13a38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

@ -35,7 +35,7 @@ export const Forms = {
export const Card = waitForComponent<t.Card>("Card", m => m.Types?.PRIMARY && m.defaultProps); export const Card = waitForComponent<t.Card>("Card", m => m.Types?.PRIMARY && m.defaultProps);
export const Button = waitForComponent<t.Button>("Button", ["Hovers", "Looks", "Sizes"]); export const Button = waitForComponent<t.Button>("Button", ["Hovers", "Looks", "Sizes"]);
export const Switch = waitForComponent<t.Switch>("Switch", filters.byCode("tooltipNote", "ringTarget")); export const Switch = waitForComponent<t.Switch>("Switch", filters.byCode("tooltipNote", "ringTarget"));
export const Tooltip = waitForComponent<t.Tooltip>("Tooltip", ["Positions", "Colors"]); export const Tooltip = waitForComponent<t.Tooltip>("Tooltip", filters.byCode("shouldShowTooltip:!1", "clickableOnMobile||"));
export const Timestamp = waitForComponent<t.Timestamp>("Timestamp", filters.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")); export const Timestamp = waitForComponent<t.Timestamp>("Timestamp", filters.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format"));
export const TextInput = waitForComponent<t.TextInput>("TextInput", ["defaultProps", "Sizes", "contextType"]); export const TextInput = waitForComponent<t.TextInput>("TextInput", ["defaultProps", "Sizes", "contextType"]);
export const TextArea = waitForComponent<t.TextArea>("TextArea", filters.byCode("handleSetRef", "textArea")); export const TextArea = waitForComponent<t.TextArea>("TextArea", filters.byCode("handleSetRef", "textArea"));

@ -90,16 +90,17 @@ export type Tooltip = ComponentType<{
/** Tooltip.Colors.BLACK */ /** Tooltip.Colors.BLACK */
color?: string; color?: string;
/** Tooltip.Positions.TOP */ /** TooltipPositions.TOP */
position?: string; position?: string;
tooltipClassName?: string; tooltipClassName?: string;
tooltipContentClassName?: string; tooltipContentClassName?: string;
}> & { }> & {
Positions: Record<"BOTTOM" | "CENTER" | "LEFT" | "RIGHT" | "TOP" | "WINDOW_CENTER", string>;
Colors: Record<"BLACK" | "BRAND" | "CUSTOM" | "GREEN" | "GREY" | "PRIMARY" | "RED" | "YELLOW", string>; Colors: Record<"BLACK" | "BRAND" | "CUSTOM" | "GREEN" | "GREY" | "PRIMARY" | "RED" | "YELLOW", string>;
}; };
export type TooltipPositions = Record<"BOTTOM" | "CENTER" | "LEFT" | "RIGHT" | "TOP" | "WINDOW_CENTER", string>;
export type Card = ComponentType<PropsWithChildren<HTMLProps<HTMLDivElement> & { export type Card = ComponentType<PropsWithChildren<HTMLProps<HTMLDivElement> & {
editable?: boolean; editable?: boolean;
outline?: boolean; outline?: boolean;