1- import type { Interpolation , Theme } from "@emotion/react" ;
21import type { FC , ReactNode } from "react" ;
32import {
43 FeatureStageBadge ,
@@ -21,6 +20,9 @@ interface SectionProps {
2120 featureStage ?: keyof typeof featureStageBadgeTypes ;
2221}
2322
23+ const DESCRIPTION_CLASS =
24+ "text-content-secondary text-base m-0 mt-1 leading-normal" ;
25+
2426export const Section : FC < SectionProps > = ( {
2527 id,
2628 title,
@@ -36,7 +38,7 @@ export const Section: FC<SectionProps> = ({
3638 < section className = { className } id = { id } data-testid = { id } >
3739 < div className = { layout === "fluid" ? "max-w-full" : "max-w-[500px]" } >
3840 { ( title || description ) && (
39- < div css = { styles . header } >
41+ < div className = "mb-6 flex flex-row justify-between" >
4042 < div >
4143 { title && (
4244 < Stack direction = "row" alignItems = "center" >
@@ -51,10 +53,10 @@ export const Section: FC<SectionProps> = ({
5153 </ Stack >
5254 ) }
5355 { description && typeof description === "string" && (
54- < p css = { styles . description } > { description } </ p >
56+ < p className = { DESCRIPTION_CLASS } > { description } </ p >
5557 ) }
5658 { description && typeof description !== "string" && (
57- < div css = { styles . description } > { description } </ div >
59+ < div className = { DESCRIPTION_CLASS } > { description } </ div >
5860 ) }
5961 </ div >
6062 { toolbar && < div > { toolbar } </ div > }
@@ -66,19 +68,3 @@ export const Section: FC<SectionProps> = ({
6668 </ section >
6769 ) ;
6870} ;
69-
70- const styles = {
71- header : {
72- marginBottom : 24 ,
73- display : "flex" ,
74- flexDirection : "row" ,
75- justifyContent : "space-between" ,
76- } ,
77- description : ( theme ) => ( {
78- color : theme . palette . text . secondary ,
79- fontSize : 16 ,
80- margin : 0 ,
81- marginTop : 4 ,
82- lineHeight : "140%" ,
83- } ) ,
84- } satisfies Record < string , Interpolation < Theme > > ;
0 commit comments