Skip to content

Commit

Permalink
fix(rn-ui): respect user provided theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Edelman committed Mar 11, 2021
1 parent 85d4dcf commit 64357b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/aws-amplify-react-native/src/Auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ interface IWithAuthenticatorState {

export function withAuthenticator<Props extends object>(
Comp: React.ComponentType<Props>,
includeGreetings = false,
includeGreetings: boolean | { [index: string]: any } = false,
authenticatorComponents = [],
federated = null,
theme: AmplifyThemeType = null,
Expand All @@ -80,6 +80,9 @@ export function withAuthenticator<Props extends object>(
this.authConfig = {};

if (typeof includeGreetings === 'object' && includeGreetings !== null) {
if (includeGreetings.theme) {
theme = includeGreetings.theme;
}
this.authConfig = Object.assign(this.authConfig, includeGreetings);
} else {
this.authConfig = {
Expand Down

0 comments on commit 64357b1

Please sign in to comment.