mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Merge branch 'next' into ui-message
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import cn from "classnames";
|
||||
import React, { AllHTMLAttributes, StatelessComponent } from "react";
|
||||
import React, { AllHTMLAttributes, Ref, StatelessComponent } from "react";
|
||||
|
||||
import { withForwardRef, withStyles } from "talk-ui/hocs";
|
||||
import { PropTypesOf } from "talk-ui/types";
|
||||
@@ -14,6 +14,8 @@ interface InnerProps extends AllHTMLAttributes<HTMLElement> {
|
||||
classes: typeof styles;
|
||||
component?: string;
|
||||
children: React.ReactNode;
|
||||
/** Internal: Forwarded Ref */
|
||||
forwardRef?: Ref<HTMLButtonElement>;
|
||||
}
|
||||
|
||||
const AriaInfo: StatelessComponent<InnerProps> = props => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import cn from "classnames";
|
||||
import { pick } from "lodash";
|
||||
import React, { ButtonHTMLAttributes, Ref } from "react";
|
||||
import React, { Ref } from "react";
|
||||
|
||||
import { withForwardRef, withStyles } from "talk-ui/hocs";
|
||||
import { PropTypesOf } from "talk-ui/types";
|
||||
@@ -10,7 +10,7 @@ import * as styles from "./Button.css";
|
||||
|
||||
// This should extend from BaseButton instead but we can't because of this bug
|
||||
// TODO: add bug link.
|
||||
interface InnerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
interface InnerProps extends BaseButtonProps {
|
||||
/** If set renders an anchor tag instead */
|
||||
anchor?: boolean;
|
||||
href?: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ export const ButtonIcon: StatelessComponent<InnerProps> = props => {
|
||||
|
||||
ButtonIcon.defaultProps = {
|
||||
size: "sm",
|
||||
};
|
||||
} as Partial<InnerProps>;
|
||||
|
||||
const enhanced = withForwardRef(withStyles(styles)(ButtonIcon));
|
||||
export type ButtonIconProps = PropTypesOf<typeof enhanced>;
|
||||
|
||||
@@ -51,7 +51,7 @@ const CallOut: StatelessComponent<CallOutProps> = props => {
|
||||
CallOut.defaultProps = {
|
||||
color: "regular",
|
||||
fullWidth: false,
|
||||
};
|
||||
} as Partial<CallOutProps>;
|
||||
|
||||
const enhanced = withStyles(styles)(CallOut);
|
||||
export default enhanced;
|
||||
|
||||
@@ -30,7 +30,7 @@ const HorizontalGutter: StatelessComponent<InnerProps> = props => {
|
||||
|
||||
HorizontalGutter.defaultProps = {
|
||||
size: "full",
|
||||
};
|
||||
} as Partial<InnerProps>;
|
||||
|
||||
const enhanced = withForwardRef(withStyles(styles)(HorizontalGutter));
|
||||
export type HorizontalGutterProps = PropTypesOf<typeof enhanced>;
|
||||
|
||||
@@ -37,7 +37,7 @@ const Icon: StatelessComponent<InnerProps> = props => {
|
||||
|
||||
Icon.defaultProps = {
|
||||
size: "sm",
|
||||
};
|
||||
} as Partial<InnerProps>;
|
||||
|
||||
const enhanced = withForwardRef(withStyles(styles)(Icon));
|
||||
export type IconProps = PropTypesOf<typeof enhanced>;
|
||||
|
||||
@@ -89,7 +89,7 @@ TextField.defaultProps = {
|
||||
color: "regular",
|
||||
placeholder: "",
|
||||
type: "text",
|
||||
};
|
||||
} as Partial<TextFieldProps>;
|
||||
|
||||
const enhanced = withStyles(styles)(TextField);
|
||||
export default enhanced;
|
||||
|
||||
@@ -151,7 +151,7 @@ Typography.defaultProps = {
|
||||
noWrap: false,
|
||||
paragraph: false,
|
||||
variant: "bodyCopy",
|
||||
};
|
||||
} as Partial<InnerProps>;
|
||||
|
||||
const enhanced = withForwardRef(withStyles(styles)(Typography));
|
||||
export type TypographyProps = PropTypesOf<typeof enhanced>;
|
||||
|
||||
Reference in New Issue
Block a user