File tree Expand file tree Collapse file tree
apps/pie-storybook/stories
packages/components/pie-list/src/pie-list-item Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,6 +192,42 @@ export const CheckboxLeadingListItem: Story = {
192192 ` ,
193193} ;
194194
195+ export const IconLeadingListItemSecondaryText : Story = {
196+ name : 'List Item - Icon Leading - Secondary Text' ,
197+ parameters : {
198+ backgrounds : {
199+ default : 'background-subtle' ,
200+ } ,
201+ } ,
202+ render : ( ) => html `
203+ < div style ="width: 350px ">
204+ < pie-list >
205+ < pie-list-item leadingType ="icon " primaryText ="Next payment " secondaryText ="4 May 2025, £1.99 per month ">
206+ < icon-plus-circle size ="m " slot ="leading "> </ icon-plus-circle >
207+ </ pie-list-item >
208+ </ pie-list >
209+ </ div >
210+ ` ,
211+ } ;
212+
213+ export const ThumbnailLeadingListItemSecondaryText : Story = {
214+ name : 'List Item - Thumbnail Leading - Secondary Text' ,
215+ parameters : {
216+ backgrounds : {
217+ default : 'background-subtle' ,
218+ } ,
219+ } ,
220+ render : ( ) => html `
221+ < div style ="width: 350px ">
222+ < pie-list >
223+ < pie-list-item leadingType ="thumbnail " primaryText ="Next payment " secondaryText ="4 May 2025, £1.99 per month ">
224+ < img slot ="leading " src ="https://placehold.co/32x24 " alt ="placeholder ">
225+ </ pie-list-item >
226+ </ pie-list >
227+ </ div >
228+ ` ,
229+ } ;
230+
195231//----------------------------------------------------------------------
196232// 2. INTERACTIVITY (INTERACTIVE/NON-INTERACTIVE)
197233//----------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -488,7 +488,7 @@ export class PieListItem extends RtlMixin(PieElement) implements ListItemProps {
488488
489489 <!-- Secondary text -->
490490 ${ this . secondaryText ? html `
491- < div class ="c-list-item__secondary "> ${ this . secondaryText } </ div >
491+ < p class ="c-list-item__secondary "> ${ this . secondaryText } </ p >
492492 ` : html `
493493 < slot name ="secondary "> </ slot >
494494 ` }
Original file line number Diff line number Diff line change 3535// Primary text styles
3636.c-list-item__primary {
3737 color : var (--dt-color-content-default );
38- font-size : var (--dt-font-body-l-size );
38+ font-size : #{ p . font-size (--dt-font-body-l-size )} ;
3939 font-weight : var (--dt-font-weight-regular );
40+ line-height : #{p .line-height (--dt-font-body-l-line-height )} ;
4041 overflow : hidden ;
4142 text-overflow : ellipsis ;
4243 white-space : nowrap ;
4546// Secondary text styles
4647.c-list-item__secondary {
4748 color : var (--dt-color-content-subdued );
48- font-size : var (--dt-font-body-s-size );
49+ font-size : #{ p . font-size (--dt-font-body-s-size )} ;
4950 overflow : hidden ;
5051 text-overflow : ellipsis ;
5152 white-space : nowrap ;
53+ margin : 0 ;
5254}
5355
5456// Leading content container - using logical properties for RTL support
7274// Meta text styles
7375.c-list-item__meta {
7476 color : var (--dt-color-content-subdued );
75- font-size : var (--dt-font-body-s-size );
77+ font-size : #{ p . font-size (--dt-font-body-s-size )} ;
7678 white-space : nowrap ;
7779 overflow : hidden ;
7880 text-overflow : ellipsis ;
7981}
8082
8183// Compact variation
8284.c-list-item--compact {
83- padding-block : var (--dt-spacing-b );
85+ padding-block : var (--dt-spacing-c );
8486 padding-inline : var (--dt-spacing-d );
8587 min-height : 40px ;
8688}
You can’t perform that action at this time.
0 commit comments