-
Hi! Wondering if it's possible/recommended to add paragraph text to the Side Modal Header. Spacing seems a little off if added in the body: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
To add paragraph text to the Side Modal Header while maintaining design consistency, you can use the import { SideModalHeader, SideModalHeading } from './SideModalHeader';
import { CustomizationProvider } from '@twilio-paste/customization';
import { useTheme } from '@twilio-paste/theme';
const CustomSideModalHeader = () => {
const currentTheme = useTheme();
return (
<CustomizationProvider
theme={currentTheme}
elements={{
SIDE_MODAL_HEADER: {
padding: "space80",
borderBottomWidth: "borderWidth30",
},
SIDE_MODAL_HEADING: {
fontSize: "fontSize60",
lineHeight: "lineHeight60",
},
}}
>
<SideModalHeader>
<SideModalHeading>Main Title</SideModalHeading>
<p>Additional paragraph text providing more context or information.</p>
</SideModalHeader>
</CustomizationProvider>
);
}; This approach ensures that the additional text is styled consistently with the rest of the design system [1][2]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
Hey @ceyerkes! Yeah, that spacing is definitely off. We have a ticket in the backlog to make some visual improvements to Side Modal, so we'll be sure to take a look at the spacing between the heading and the body. For now you should be able to reduce the top padding of the body in Figma, and if your engineers need to build before we get around to that ticket, they should be able to solve it by wrapping the body content in a Box with some negative top margin spacing.
|
Beta Was this translation helpful? Give feedback.
Hey @ceyerkes! Yeah, that spacing is definitely off. We have a ticket in the backlog to make some visual improvements to Side Modal, so we'll be sure to take a look at the spacing between the heading and the body. For now you should be able to reduce the top padding of the body in Figma, and if your engineers need to build before we get around to that ticket, they should be able to solve it by wrapping the body content in a Box with some negative top margin spacing.