0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

fix(console): icons in item preview should not be shrinked (#1234)

This commit is contained in:
Xiao Yijun 2022-06-27 13:17:18 +08:00 committed by GitHub
parent 2a34684587
commit 2d663025ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 23 deletions

View file

@ -14,6 +14,10 @@
flex: 1;
}
.icon {
flex-shrink: 0;
}
.pagination {
margin-top: _.unit(4);
min-height: 32px;

View file

@ -108,28 +108,31 @@ const ApiResources = () => {
/>
</TableEmpty>
)}
{apiResources?.map(({ id, name, indicator }) => (
<tr
key={id}
className={tableStyles.clickable}
onClick={() => {
navigate(buildDetailsLink(id));
}}
>
<td>
<ItemPreview
title={name}
icon={
theme === AppearanceMode.LightMode ? <ApiResource /> : <ApiResourceDark />
}
to={buildDetailsLink(id)}
/>
</td>
<td>
<CopyToClipboard value={indicator} variant="text" />
</td>
</tr>
))}
{apiResources?.map(({ id, name, indicator }) => {
const ResourceIcon =
theme === AppearanceMode.LightMode ? ApiResource : ApiResourceDark;
return (
<tr
key={id}
className={tableStyles.clickable}
onClick={() => {
navigate(buildDetailsLink(id));
}}
>
<td>
<ItemPreview
title={name}
icon={<ResourceIcon className={styles.icon} />}
to={buildDetailsLink(id)}
/>
</td>
<td>
<CopyToClipboard value={indicator} variant="text" />
</td>
</tr>
);
})}
</tbody>
</table>
</div>

View file

@ -14,6 +14,10 @@
flex: 1;
}
.icon {
flex-shrink: 0;
}
.pagination {
margin-top: _.unit(4);
min-height: 32px;

View file

@ -115,7 +115,7 @@ const Applications = () => {
<ItemPreview
title={name}
subtitle={t(`${applicationTypeI18nKey[type]}.title`)}
icon={<ApplicationIcon type={type} />}
icon={<ApplicationIcon className={styles.icon} type={type} />}
to={`/applications/${id}`}
/>
</td>

View file

@ -13,6 +13,7 @@ a.link {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.logo {

View file

@ -38,6 +38,7 @@
height: 28px;
border-radius: 6px;
object-fit: cover;
flex-shrink: 0;
}
.userName {