-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: paypal-rosman <[email protected]> Co-authored-by: Nathan Schott <[email protected]>
- Loading branch information
1 parent
d4d5080
commit 4b3d77a
Showing
20 changed files
with
1,151 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
|
||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<script src="https://localhost.paypal.com:9001/sdk.js?client-id=alc_client1¤cy=USD"></script> | ||
<script src="https://localhost.paypal.com:9001/sdk-constants.js"></script> | ||
<style> | ||
.paypal-button-container { | ||
border: 2px solid black | ||
} | ||
hr { | ||
margin: 5px 0 5px | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="buttons-1"></div> | ||
<hr /> | ||
<div class="buttons-2"></div> | ||
<hr /> | ||
<div class="buttons-3"></div> | ||
|
||
<script> | ||
const buttons1 = paypal.Buttons({ | ||
style: { | ||
layout: "vertical", | ||
}, | ||
}); | ||
const buttons2 = paypal.Buttons({ | ||
style: { | ||
layout: "horizontal", | ||
tagline: true, | ||
}, | ||
}); | ||
const buttons3 = paypal.Buttons({ | ||
fundingSource: "paypal", | ||
style: { | ||
// layout: "horizontal", | ||
// tagline: true, | ||
}, | ||
}); | ||
|
||
buttons1.render(".buttons-1"); | ||
buttons2.render(".buttons-2"); | ||
buttons3.render(".buttons-3"); | ||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* @flow */ | ||
/** @jsx node */ | ||
|
||
import { node, type ChildType } from "@krakenjs/jsx-pragmatic/src"; | ||
|
||
import { CLASS } from "../../constants"; | ||
|
||
const INITIAL_RESERVED_HEIGHT = "36px"; | ||
|
||
type MessageProps = {| | ||
markup: ?string, | ||
position: string, | ||
|}; | ||
|
||
export function Message({ markup, position }: MessageProps): ChildType { | ||
const messageClassNames = [ | ||
CLASS.BUTTON_MESSAGE, | ||
`${CLASS.BUTTON_MESSAGE}-${position}`, | ||
].join(" "); | ||
|
||
if (typeof markup !== "string") { | ||
return ( | ||
<div | ||
class={`${messageClassNames} ${CLASS.BUTTON_MESSAGE_RESERVE}`} | ||
style={`height:${INITIAL_RESERVED_HEIGHT}`} | ||
/> | ||
); | ||
} | ||
|
||
return <div class={messageClassNames} innerHTML={markup} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.