mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 03:31:47 +00:00
Fixed declaration of title/label as ReactNode for components, per docs
This commit is contained in:
@@ -10,6 +10,7 @@ declare namespace DropdownButton {
|
||||
navItem?: boolean;
|
||||
noCaret?: boolean;
|
||||
pullRight?: boolean;
|
||||
title: React.ReactNode;
|
||||
}
|
||||
|
||||
export type DropdownButtonProps = DropdownButtonBaseProps & React.HTMLProps<DropdownButton>;
|
||||
|
||||
+3
-2
@@ -1,8 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { Sizes } from 'react-bootstrap';
|
||||
import { Sizes, Omit } from 'react-bootstrap';
|
||||
|
||||
declare namespace Popover {
|
||||
export interface PopoverProps extends React.HTMLProps<Popover> {
|
||||
export interface PopoverProps extends Omit<React.HTMLProps<Popover>, "title"> {
|
||||
// Optional
|
||||
arrowOffsetLeft?: number | string;
|
||||
arrowOffsetTop?: number | string;
|
||||
@@ -11,6 +11,7 @@ declare namespace Popover {
|
||||
placement?: string;
|
||||
positionLeft?: number | string; // String support added since v0.30.0
|
||||
positionTop?: number | string; // String support added since v0.30.0
|
||||
title?: React.ReactNode;
|
||||
}
|
||||
}
|
||||
declare class Popover extends React.Component<Popover.PopoverProps> { }
|
||||
|
||||
+3
-2
@@ -1,8 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import { Sizes } from 'react-bootstrap';
|
||||
import { Sizes, Omit } from 'react-bootstrap';
|
||||
|
||||
declare namespace ProgressBar {
|
||||
export interface ProgressBarProps extends React.HTMLProps<ProgressBar> {
|
||||
export interface ProgressBarProps extends Omit<React.HTMLProps<ProgressBar>, "label"> {
|
||||
// Optional
|
||||
active?: boolean;
|
||||
bsSize?: Sizes;
|
||||
@@ -13,6 +13,7 @@ declare namespace ProgressBar {
|
||||
now?: number;
|
||||
srOnly?: boolean;
|
||||
striped?: boolean;
|
||||
label?: React.ReactNode;
|
||||
}
|
||||
}
|
||||
declare class ProgressBar extends React.Component<ProgressBar.ProgressBarProps> { }
|
||||
|
||||
+4
-2
@@ -1,13 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { Sizes } from 'react-bootstrap';
|
||||
import { Sizes, Omit } from 'react-bootstrap';
|
||||
|
||||
declare namespace SplitButton {
|
||||
export interface SplitButtonProps extends React.HTMLProps<SplitButton> {
|
||||
export interface SplitButtonProps extends Omit<React.HTMLProps<SplitButton>, "title"> {
|
||||
bsStyle?: string;
|
||||
bsSize?: Sizes;
|
||||
dropdownTitle?: any; // TODO: Add more specific type
|
||||
dropup?: boolean;
|
||||
pullRight?: boolean;
|
||||
title: React.ReactNode;
|
||||
id: string;
|
||||
}
|
||||
}
|
||||
declare class SplitButton extends React.Component<SplitButton.SplitButtonProps> { }
|
||||
|
||||
@@ -120,7 +120,7 @@ export class ReactBootstrapIndividualComponentsTest extends React.Component {
|
||||
<Collapse />
|
||||
<ControlLabel />
|
||||
<Dropdown id="foo" />
|
||||
<DropdownButton id="foo" />
|
||||
<DropdownButton id="foo" title="bar" />
|
||||
<DropdownMenu />
|
||||
<DropdownToggle />
|
||||
<Fade />
|
||||
@@ -178,7 +178,7 @@ export class ReactBootstrapIndividualComponentsTest extends React.Component {
|
||||
<ResponsiveEmbed />
|
||||
<Row />
|
||||
<SafeAnchor />
|
||||
<SplitButton />
|
||||
<SplitButton id="foo" title="bar" />
|
||||
<SplitToggle />
|
||||
<Tab />
|
||||
<TabContainer />
|
||||
|
||||
Reference in New Issue
Block a user