@@ -40,85 +40,75 @@ import uk.gov.hmrc.sample_compose_fragments.presentation.screens.sampletemplate.
4040fun PrimaryCardViewScreen (onClickAction : () -> Unit ) {
4141 ScreenScrollViewColumn {
4242 PlaceholderSlot {
43- PrimaryCardView (
44- title = stringResource(id = R .string.primary_card_placeholder_title),
45- content = {
46- Text (
47- text = stringResource(id = R .string.primary_card_placeholder_body),
48- style = HmrcTheme .typography.body
49- )
50- }
51- )
43+ PrimaryCardView (stringResource(id = R .string.primary_card_placeholder_title)) {
44+ Text (
45+ text = stringResource(id = R .string.primary_card_placeholder_body),
46+ style = HmrcTheme .typography.body
47+ )
48+ }
5249 }
5350
5451 ExamplesSlot {
5552 PrimaryCardView (
56- modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
5753 title = stringResource(id = R .string.primary_card_example_1_title),
58- content = {
59- Text (
60- text = stringResource(id = R .string.primary_card_example_1_body),
61- style = HmrcTheme .typography.body
62- )
63- }
64- )
54+ modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16)
55+ ) {
56+ Text (
57+ text = stringResource(id = R .string.primary_card_example_1_body),
58+ style = HmrcTheme .typography.body
59+ )
60+ }
6561 PrimaryCardView (
66- modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
6762 title = stringResource(id = R .string.longer_text),
68- content = {
69- Text (
70- text = stringResource(id = R .string.longest_text),
71- style = HmrcTheme .typography.body
72- )
73- Spacer (modifier = Modifier .height( HmrcTheme .dimensions.hmrcSpacing16) )
74- InsetTextView (text = stringResource(id = R .string.longer_text ))
75- }
76- )
63+ modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16)
64+ ) {
65+ Text (
66+ text = stringResource(id = R .string.longest_text),
67+ style = HmrcTheme .typography.body
68+ )
69+ Spacer (modifier = Modifier .height( HmrcTheme .dimensions.hmrcSpacing16 ))
70+ InsetTextView (text = stringResource(id = R .string.longer_text))
71+ }
7772 PrimaryCardView (
78- modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
7973 title = stringResource(id = R .string.primary_card_example_1_title),
80- content = {
81- Text (
82- text = stringResource(id = R .string.primary_card_example_1_body),
83- style = HmrcTheme .typography.body
84- )
85- Spacer (modifier = Modifier .height(HmrcTheme .dimensions.hmrcSpacing16))
86- PrimaryButton (text = stringResource(id = R .string.primary_card_example_3_button))
87- { onClickAction() }
88- }
89- )
90-
74+ modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16)
75+ ) {
76+ Text (
77+ text = stringResource(id = R .string.primary_card_example_1_body),
78+ style = HmrcTheme .typography.body
79+ )
80+ Spacer (modifier = Modifier .height(HmrcTheme .dimensions.hmrcSpacing16))
81+ PrimaryButton (text = stringResource(id = R .string.primary_card_example_3_button))
82+ { onClickAction() }
83+ }
9184 PrimaryCardView (
92- modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
93- childPadding = false ,
9485 title = stringResource(id = R .string.longer_text),
95- content = {
96- Text (
97- modifier = Modifier
98- .padding(
99- start = HmrcTheme .dimensions.hmrcSpacing16,
100- end = HmrcTheme .dimensions.hmrcSpacing16,
101- top = HmrcTheme .dimensions.hmrcSpacing16
102- ),
103- text = stringResource(id = R .string.longest_text),
104- style = HmrcTheme .typography.body
105- )
106- SecondaryButton (text = stringResource(id = R .string.long_text),
107- textAlign = TextAlign .Start ,
108- onClick = { onClickAction() })
109- }
110- )
111-
112- PrimaryCardView (
11386 modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
114- childPadding = false ,
87+ childPadding = false
88+ ) {
89+ Text (
90+ modifier = Modifier
91+ .padding(
92+ start = HmrcTheme .dimensions.hmrcSpacing16,
93+ end = HmrcTheme .dimensions.hmrcSpacing16,
94+ top = HmrcTheme .dimensions.hmrcSpacing16
95+ ),
96+ text = stringResource(id = R .string.longest_text),
97+ style = HmrcTheme .typography.body
98+ )
99+ SecondaryButton (text = stringResource(id = R .string.long_text),
100+ textAlign = TextAlign .Start ,
101+ onClick = { onClickAction() })
102+ }
103+ PrimaryCardView (
115104 title = stringResource(id = R .string.longer_text),
116- content = {
117- IconButton (text = stringResource(id = R .string.long_text),
118- iconResId = R .drawable.ic_info,
119- onClick = { onClickAction() })
120- }
121- )
105+ modifier = Modifier .padding(bottom = HmrcTheme .dimensions.hmrcSpacing16),
106+ childPadding = false
107+ ) {
108+ IconButton (text = stringResource(id = R .string.long_text),
109+ iconResId = R .drawable.ic_info,
110+ onClick = { onClickAction() })
111+ }
122112 }
123113 }
124114}
0 commit comments