File tree Expand file tree Collapse file tree
sdk/src/widgets/definitions/configurations
widgets-lib/src/widgets/on-ramp
widgets-sample-app/src/components/ui/checkout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ export type OnrampWidgetConfiguration = {
1010 customTitle ?: string ;
1111 /** The custom subtitle to display on the exchange screen in the Transak widget (default: 'Buy') */
1212 customSubTitle ?: string ;
13+ /** Whether to show the header (default: true) */
14+ showHeader ?: boolean ;
1315} & WidgetConfiguration ;
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ export default function OnRampWidget({
143143 showMenu = { onrampConfig ?. showMenu }
144144 customTitle = { onrampConfig ?. customTitle }
145145 customSubTitle = { onrampConfig ?. customSubTitle }
146+ showHeader = { onrampConfig ?. showHeader }
146147 />
147148 ) }
148149
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ interface OnRampProps {
4545 showMenu ?: boolean ;
4646 customTitle ?: string ;
4747 customSubTitle ?: string ;
48+ showHeader ?: boolean ;
4849}
4950export function OnRampMain ( {
5051 passport,
@@ -55,6 +56,7 @@ export function OnRampMain({
5556 showMenu,
5657 customTitle,
5758 customSubTitle,
59+ showHeader = true ,
5860} : OnRampProps ) {
5961 const { connectLoaderState } = useContext ( ConnectLoaderContext ) ;
6062 const { checkout, provider } = connectLoaderState ;
@@ -275,7 +277,7 @@ export function OnRampMain({
275277 return (
276278 < Box sx = { boxMainStyle ( showIframe ) } >
277279 < SimpleLayout
278- header = { (
280+ header = { showHeader ? (
279281 < HeaderNavigation
280282 title = { customTitle ?? t ( 'views.ONRAMP.header.title' ) }
281283 onCloseButtonClick = { ( ) => sendOnRampWidgetCloseEvent ( eventTarget ) }
@@ -288,7 +290,7 @@ export function OnRampMain({
288290 ) ;
289291 } }
290292 />
291- ) }
293+ ) : undefined }
292294 footerBackgroundColor = "base.color.translucent.emphasis.200"
293295 >
294296 < Box sx = { containerStyle ( showIframe ) } >
Original file line number Diff line number Diff line change 11export const containerStyle = ( showIframe :boolean ) => ( {
22 position : 'relative' ,
33 maxWidth : '420px' ,
4- height : '565px ' ,
4+ height : '100% ' ,
55 borderRadius : 'base.borderRadius.x6' ,
66 overflow : 'hidden' ,
77 marginLeft : 'base.spacing.x2' ,
Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ function CheckoutUI() {
300300 customTitle: "Dromedary On-Ramp",
301301 customSubTitle: "Camel On-Ramp",
302302 showMenu: true,
303+ showHeader: true,
303304 },
304305 */
305306 } ,
You can’t perform that action at this time.
0 commit comments