Skip to content

Commit

Permalink
refactor: some styles and also avatar options
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Oct 28, 2022
1 parent 0f19287 commit e8f7cc8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
11 changes: 6 additions & 5 deletions lib/components/SDropdownSectionFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function handleClick(option: DropdownSectionFilterOption, value: string | number
.button {
display: flex;
align-items: center;
border-radius: 6px;
padding: 0 8px;
width: 100%;
Expand All @@ -145,6 +144,7 @@ function handleClick(option: DropdownSectionFilterOption, value: string | number
.checkbox {
display: block;
padding-top: 9px;
}
.checkbox-box {
Expand Down Expand Up @@ -177,6 +177,11 @@ function handleClick(option: DropdownSectionFilterOption, value: string | number
}
}
.option-item {
padding-left: 8px;
width: 100%;
}
.empty {
padding: 16px;
font-size: 12px;
Expand All @@ -187,8 +192,4 @@ function handleClick(option: DropdownSectionFilterOption, value: string | number
border-top: 1px solid var(--c-divider-light);
}
}
.option-item {
margin-left: 8px;
}
</style>
15 changes: 12 additions & 3 deletions lib/components/SDropdownSectionFilterItemAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,32 @@ defineProps<{

<template>
<span class="SDropdownSectionFilterItemAvatar">
<SAvatar size="nano" :avatar="image" :name="label" />
<div class="avatar">
<SAvatar size="nano" :avatar="image" :name="label" />
</div>
<span class="name">{{ label }}</span>
</span>
</template>

<style scoped lang="postcss">
.SDropdownSectionFilterItemAvatar {
display: inline-flex;
display: flex;
align-items: center;
padding-left: 8px;
padding-right: 16px;
min-height: 32px;
}
.avatar {
flex-shrink: 0;
}
.name {
display: inline-block;
padding-left: 8px;
font-size: 12px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
9 changes: 7 additions & 2 deletions lib/components/SDropdownSectionFilterItemText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ defineProps<{

<template>
<span class="SDropdownSectionFilterItemText">
{{ label }}
<span class="text">{{ label }}</span>
</span>
</template>

<style scoped lang="postcss">
.SDropdownSectionFilterItemText {
line-height: 32px;
display: inline-block;
padding: 6px 0;
}
.text {
line-height: 20px;
font-size: 12px;
font-weight: 500;
}
Expand Down

0 comments on commit e8f7cc8

Please sign in to comment.