Fix up which props are optional/required for Anchor and AnchorLink components (#5539)

This commit is contained in:
Mitchell Demler 2017-03-29 15:29:43 +13:00 committed by 偏右
parent 84baa310e2
commit 65d62cd17c
2 changed files with 6 additions and 6 deletions

View File

@ -4,13 +4,13 @@ import AnchorHelper, { scrollTo } from './anchorHelper';
export interface AnchorLinkProps {
href: string;
onClick: (href: string, component: Element) => void;
onClick?: (href: string, component: Element) => void;
active?: boolean;
prefixCls?: string;
children?: any;
title?: React.ReactNode;
offsetTop: number;
bounds: number;
title: React.ReactNode;
offsetTop?: number;
bounds?: number;
target?: () => HTMLElement | Window;
affix?: boolean;
}

View File

@ -6,8 +6,8 @@ import Affix from '../affix';
import AnchorHelper, { getDefaultTarget } from './anchorHelper';
export interface AnchorProps {
target: () => HTMLElement | Window;
children: React.ReactNode;
target?: () => HTMLElement | Window;
children?: React.ReactNode;
prefixCls?: string;
offsetTop?: number;
bounds?: number;