mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
DropdownItem onclick should be callback (#15926)
* React CSSProperties position made specific * Add test for css position * DropdownItem onClick is callback DropdownItem onClick was an event. It should be a callback function * Test DropdownItem onClick definitions
This commit is contained in:
committed by
Mohamed Hegazy
parent
fd008d7f76
commit
56ce2fe50d
2
types/reactstrap/lib/DropdownItem.d.ts
vendored
2
types/reactstrap/lib/DropdownItem.d.ts
vendored
@@ -3,7 +3,7 @@ interface Props {
|
||||
divider?: boolean;
|
||||
tag?: React.ReactType;
|
||||
header?: boolean;
|
||||
onClick?: React.MouseEvent<any>;
|
||||
onClick?: (event: React.MouseEvent<any>) => void;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,9 @@ class Example15 extends React.Component<any, any> {
|
||||
<DropdownItem disabled>Action</DropdownItem>
|
||||
<DropdownItem>Another Action</DropdownItem>
|
||||
<DropdownItem divider />
|
||||
<DropdownItem>Another Action</DropdownItem>
|
||||
<DropdownItem onClick={event => {
|
||||
// something happens here
|
||||
}}>Another Action</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</ButtonDropdown>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user