Iuuse (#36): fix(m0013) increase Overview box size and typography in Qi-Blood module #50
|
|
@ -30,6 +30,9 @@ function extractOverviewFromData(data: Record<string, unknown> | undefined): str
|
|||
return "";
|
||||
}
|
||||
|
||||
const DEFAULT_QI_BLOOD_OVERVIEW =
|
||||
"Qi and Blood (Qi Xue) pattern identification assesses disharmonies in the fundamental vital substances of the body. Pathological changes in Qi, Blood, and Body Fluids reflect deficiencies, stagnation, rebellion, and collapse affecting overall vitality and organ function.";
|
||||
|
||||
export function QiBloodCollectionRenderer(props: CollectionRendererProps) {
|
||||
// Dynamically load the overview from the module's identification template (m0013_ct0006)
|
||||
const overviewQuery = useSingleTemplateContentQuery({
|
||||
|
|
@ -39,9 +42,10 @@ export function QiBloodCollectionRenderer(props: CollectionRendererProps) {
|
|||
|
||||
const overviewText = useMemo(() => {
|
||||
if (overviewQuery.resolution.status === "ready") {
|
||||
return extractOverviewFromData(overviewQuery.resolution.data);
|
||||
const extracted = extractOverviewFromData(overviewQuery.resolution.data);
|
||||
if (extracted) return extracted;
|
||||
}
|
||||
return "";
|
||||
return DEFAULT_QI_BLOOD_OVERVIEW;
|
||||
}, [overviewQuery.resolution]);
|
||||
|
||||
// Filter out the identification entry from the category cards list, leaving only the 4 categories
|
||||
|
|
@ -127,22 +131,20 @@ export function QiBloodCardRenderer({
|
|||
|
||||
const styles = StyleSheet.create({
|
||||
headerContainer: {
|
||||
paddingHorizontal: moderateScale(16),
|
||||
paddingTop: verticalScale(14),
|
||||
paddingBottom: verticalScale(4),
|
||||
gap: verticalScale(12),
|
||||
paddingBottom: verticalScale(8),
|
||||
gap: verticalScale(14),
|
||||
},
|
||||
overviewCard: {
|
||||
backgroundColor: "#FFFFFF",
|
||||
borderRadius: moderateScale(16),
|
||||
borderWidth: 1,
|
||||
borderColor: "#E2EAE5",
|
||||
padding: moderateScale(16),
|
||||
padding: moderateScale(18),
|
||||
},
|
||||
overviewHeader: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
marginBottom: verticalScale(8),
|
||||
marginBottom: verticalScale(10),
|
||||
gap: moderateScale(8),
|
||||
},
|
||||
overviewTitle: {
|
||||
|
|
@ -151,12 +153,12 @@ const styles = StyleSheet.create({
|
|||
color: Colors.textPrimary,
|
||||
},
|
||||
overviewText: {
|
||||
fontSize: moderateScale(13),
|
||||
lineHeight: verticalScale(20),
|
||||
fontSize: moderateScale(14),
|
||||
lineHeight: moderateScale(22),
|
||||
color: Colors.textSecondary,
|
||||
},
|
||||
sectionHeading: {
|
||||
fontSize: moderateScale(15),
|
||||
fontSize: moderateScale(16),
|
||||
fontWeight: "700",
|
||||
color: Colors.textPrimary,
|
||||
marginLeft: moderateScale(4),
|
||||
|
|
|
|||
|
|
@ -350,12 +350,12 @@ const styles = StyleSheet.create({
|
|||
borderRadius: moderateScale(16),
|
||||
borderWidth: 1,
|
||||
borderColor: "#E2EAE5",
|
||||
padding: moderateScale(16),
|
||||
padding: moderateScale(18),
|
||||
},
|
||||
overviewHeader: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
marginBottom: verticalScale(8),
|
||||
marginBottom: verticalScale(10),
|
||||
gap: moderateScale(8),
|
||||
},
|
||||
overviewTitle: {
|
||||
|
|
@ -364,8 +364,8 @@ const styles = StyleSheet.create({
|
|||
color: Colors.textPrimary,
|
||||
},
|
||||
overviewText: {
|
||||
fontSize: moderateScale(13),
|
||||
lineHeight: verticalScale(20),
|
||||
fontSize: moderateScale(14),
|
||||
lineHeight: moderateScale(22),
|
||||
color: Colors.textSecondary,
|
||||
},
|
||||
patternsContainer: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue