mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #65273 [react-simple-oauth2-login] Change children type to ReactNode by @MysteryBlokHed
This commit is contained in:
committed by
GitHub
parent
19f1cc04dc
commit
06c07f9cde
4
types/react-simple-oauth2-login/index.d.ts
vendored
4
types/react-simple-oauth2-login/index.d.ts
vendored
@@ -14,14 +14,14 @@ export interface OAuth2LoginProps {
|
||||
onSuccess: (data: Record<string, any>) => void;
|
||||
onFailure: (err: Error) => void;
|
||||
buttonText?: string;
|
||||
children?: React.ReactChildren;
|
||||
children?: React.ReactNode;
|
||||
popupWidth?: number;
|
||||
popupHeight?: number;
|
||||
className?: string;
|
||||
render?: (props: {
|
||||
className: string,
|
||||
buttonText: string,
|
||||
children: React.ReactChildren,
|
||||
children: React.ReactNode,
|
||||
onClick: () => void
|
||||
}) => void;
|
||||
isCrossOrigin?: boolean;
|
||||
|
||||
@@ -18,3 +18,20 @@ export function Test() {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function TestChildren() {
|
||||
return (
|
||||
<OAuth2Login
|
||||
clientId="1234567890"
|
||||
authorizationUrl="https://example.com/oauth/authorize"
|
||||
redirectUri="https://example.com/oauth/callback"
|
||||
responseType="code"
|
||||
onSuccess={() => {}}
|
||||
onFailure={() => {}}
|
||||
>
|
||||
<div className="child-test"></div>
|
||||
<div className="child-test"></div>
|
||||
<div className="child-test"></div>
|
||||
</OAuth2Login>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user