Deprecated: Paste Console theme #2084
-
Paste Console theme deprecated November 30thWith the new Console experience being made Generally Available to all customers, the Design Systems team is deprecating the legacy Console theme in Paste. The default theme is the recommended configuration for all Paste consumers going forward. The Console theme will be removed from Paste on February 4th, 2022 as a major release and will affect the following packages:
For more information on how to change the theme and more FAQs, please read our documentation. If you have any questions, please post them below. What do I need to do?If possible, migrate to the new Console repo because they use the default theme and load the fonts for you. Otherwise, if you use the Console theme, you will need to update the theme prop from “console” to “default” on the import {Theme} from '@twilio-paste/theme';
<Theme.Provider theme="default">
<App />
</Theme.Provider> If you are using Paste components and only using tokens to style your app, the You also need to load the correct fonts for the default theme. The best way to do this is to include the following snippet in the <link rel="preconnect" href="https://assets.twilio.com" crossorigin />
<link rel="stylesheet" href="https://assets.twilio.com/public_assets/paste-fonts/main-1.2.0/fonts.css" /> Alternatively, Paste will automatically load the default theme's font via JavaScript. Note: this will result in slower download times than including the fonts in the Why is the Console theme being deprecated?The Console theme was initially created as a migration tool to make it easier to adopt Paste in Twilio UIs. The default theme was later created to unite Twilio UIs under the new Twilio product design language. With the new Console experience — which uses the default theme — going GA, we are ready to make the full switch to the default theme. Do I have to do it by February 4th?If you upgrade Paste to the new major version without switching themes, the default theme will automatically be shown instead of the Console theme. We, therefore, strongly recommend testing the default theme in your applications before you upgrade. If you have any feedback or need any help, please post below. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
hey team, we are trying to migrate the theme but we have component which is using
As I see in the this comment of @richbachman looks like it change the design token from
I tried to use const StyledBox = styled(Box)({
backgroundColor: 'colorBackgroundBody',
// ...
}); I also saw some examples using something like this but not sure if it's the proper way const StyledBox = styled.box`
backgroundColor: ${props => props.theme.backgroundColors.colorBackgroundBody}; // Typescript is complaning that the property doesn't exist...
`; I made it work with with export const RadioToggle: React.FC<RadioToggleProps> = ({
currentValue,
handleChange,
radioValues,
}) => {
const theme = useTheme();
return (
<Box as="div" id="view-container" width="size200">
<Box
backgroundColor={theme.backgroundColors.colorBackgroundBody} This is the original component: export const RadioToggle: React.FC<RadioToggleProps> = ({
currentValue,
handleChange,
radioValues,
}) => (
<Box as="div" id="view-container" width="size200">
<Box
backgroundColor="colorBackgroundBody"
borderColor="colorBorderLight"
borderRadius="borderRadius20"
borderStyle="solid"
borderWidth="borderWidth10"
display="inline-flex"
maxWidth="size40"
>
<Box
as="fieldset"
display="inherit"
borderWidth="borderWidth0"
padding="space0"
margin="space0"
>
{radioValues.map((radioValue) => (
<StyledRadio
data-s="radio-toggle-input"
key={radioValue}
currentValue={currentValue}
value={radioValue}
handleChange={handleChange}
/>
))}
</Box>
</Box>
</Box>
); |
Beta Was this translation helpful? Give feedback.
-
Commenting to mark this as answered |
Beta Was this translation helpful? Give feedback.
Commenting to mark this as answered