Skip to content

Can a single unified theme file be passed to the Flex config to style both the Flex UI and plugins using Paste's CustomizationProvider? #2742

Answered by TheSisb
WillCKyle asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @WillCKyle,

The Paste team isn't very familiar with the Flex API so you may want to check with the Flex team directly. I did some digging for you anyways, here's what I found:


In Flex 2.0 you can follow this instruction to set the theme globally: https://www.twilio.com/docs/flex/developer/ui/overview-of-flex-ui-programmability-options#theming-flex-ui

It would look like this in your main plugin file:

import { Theme as PasteTheme } from "@twilio-paste/core/theme";

...

async init(flex, manager) {
  flex.setProviders({
	PasteThemeProvider: PasteTheme.Provider,
  });
}

and in your custom components:

import { withTheme } from "@twilio/flex-ui";

...

export default withTheme(withTaskContext(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TheSisb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
External This Discussion was posted by a non-Twilio Paste consumer
2 participants