Skip to content

Commit 0e9b6a3

Browse files
committed
🐛 Fix List subText alignment for links without icons
1 parent d990a55 commit 0e9b6a3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/components/List/List.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const wrapperClasses = [
7676
<ConditionalWrapper condition={!!(item.icon && item.subText)}>
7777
<div slot="wrapper">children</div>
7878
{item.icon && <Fragment set:html={item.icon} />}
79-
{item.name}
79+
<div>{item.name}</div>
8080
</ConditionalWrapper>
8181
{item.subText && <span>{item.subText}</span>}
8282
</ConditionalWrapper>

src/components/List/List.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
{#if item.icon}
131131
{@html item.icon}
132132
{/if}
133-
{item.name}
133+
<div>{item.name}</div>
134134
</ConditionalWrapper>
135135
{#if item.subText}
136136
<span>{item.subText}</span>

src/components/List/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const List = ({
147147
style={{ height: '18px' }}
148148
/>
149149
)}
150-
{item.name}
150+
<div>{item.name}</div>
151151
</ConditionalWrapper>
152152
{item.subText && <span>{item.subText}</span>}
153153
</ConditionalWrapper>

src/data.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ export const listWithGroups = [
151151
icon: infoIcon,
152152
subText: 'Learn more'
153153
},
154-
{ name: 'Switch theme', value: 'theme', icon: moonIcon }
154+
{ name: 'Switch theme', href: '#', icon: moonIcon }
155155
]
156156
},
157157
{
158158
title: 'Settings',
159159
items: [
160160
{ name: 'Profile', href: '#' },
161-
{ name: 'Preferences', href: '#' },
162-
{ name: 'Sign out', value: 'sign-out' }
161+
{ name: 'Preferences', href: '#', subText: 'Update styles' },
162+
{ name: 'Sign out', value: 'sign-out', subText: 'Save your work' }
163163
]
164164
}
165165
]

0 commit comments

Comments
 (0)