-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make container ID as optional prop #110
base: main
Are you sure you want to change the base?
Conversation
Olá @luisguerra, assim que possível faremos a revisão e teste das alterações. |
@luisguerra obrigado por contribuir com o projeto, excelente sugestão. Tenho só um ponto que penso que podemos alterar. O nome da propriedade Como é um elemento customizado do React não teria conflito com outras propriedades. Além de ser padrão a utilização somente da prop O que você acha? Podemos mudar esse nome da prop para ser mais consistente no futuro? Alterando isso a gente já aprova o PR 😄 |
onReady = onReadyDefault, | ||
customization, | ||
locale, | ||
divId = 'brandBrick_container', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divId = 'brandBrick_container', | |
id = 'brandBrick_container', |
@@ -50,7 +55,7 @@ const Brand = ({ onReady = onReadyDefault, customization, locale }: TBrand) => { | |||
window.brandBrickController?.unmount(); | |||
}; | |||
}, [customization, onReady]); | |||
return <div id="brandBrick_container"></div>; | |||
return <div id={divId}></div>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return <div id={divId}></div>; | |
return <div id={id}></div>; |
valueProp: 'payment_methods_logos', | ||
}, | ||
}} | ||
divId="customBrandBrick_container" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divId="customBrandBrick_container" | |
id="customBrandBrick_container" |
@@ -37,7 +42,7 @@ const Brand = ({ onReady = onReadyDefault, customization, locale }: TBrand) => { | |||
}, | |||
}, | |||
name: 'brand', | |||
divId: 'brandBrick_container', | |||
divId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divId, | |
divId: id, |
/** | ||
* Optional. Container ID where the Brick will be rendered. Default: 'walletBrick_container' | ||
*/ | ||
divId?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divId?: string; | |
id?: string; |
This PR enables the ability to modify the div to avoid collision with existing ID's or define multiple elements