score:4

no

see https://github.com/aws-amplify/docs/issues/2484

in short, someone is making a feature request to:

  • support theme object as aws-amplify-react does.

the example they give that is not working for the newer @aws-amplify/ui-react release is:

const mytheme = {
   formsection: { 'display': 'none' }
}

// define class app { ... }

export default withauthenticator(app, { theme: mytheme })

from what i understand, the new amplify components do not take styling through js objects, only css as of now, given the issue that's still open.

p.s. probably not want you want to hear, but fwiw i pulled up a codesandbox and tried it myself and could not get it to work. i also attempted the solution here customise aws amplify ui? and it seems like the new components from @aws-amplify/ui-react don't accept styles as aws-amplify-react does.


Related Query

More Query from same tag