Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: icon not align center in filter button (#3938)

Qi61ac597cba3f
diff --git a/packages/component/src/components/page-list/filter/condition.tsx b/packages/component/src/components/page-list/filter/condition.tsx
index b6f74d30aa..3b025676bd 100644
--- a/packages/component/src/components/page-list/filter/condition.tsx
+++ b/packages/component/src/components/page-list/filter/condition.tsx
@@ -63,9 +63,7 @@ export const Condition = ({
<div className={styles.filterTypeIconStyle}>
{variableDefineMap[ast.left.name].icon}
</div>
- <div>
- <FilterTag name={ast.left.name} />
- </div>
+ <FilterTag name={ast.left.name} />
</div>
</Menu>
<Menu
diff --git a/packages/component/src/components/page-list/filter/index.css.ts b/packages/component/src/components/page-list/filter/index.css.ts
index 5c42e68238..5ac50cbff8 100644
--- a/packages/component/src/components/page-list/filter/index.css.ts
+++ b/packages/component/src/components/page-list/filter/index.css.ts
@@ -53,6 +53,8 @@ export const switchStyle = style({
color: 'var(--affine-text-secondary-color)',
padding: '2px 4px',
transition: 'all 0.15s ease-in-out',
+ display: 'flex',
+ alignItems: 'center',
':hover': {
cursor: 'pointer',
background: 'var(--affine-hover-color)',
@@ -62,6 +64,7 @@ export const switchStyle = style({
export const filterTypeStyle = style({
fontSize: 'var(--affine-font-sm)',
display: 'flex',
+ alignItems: 'center',
padding: '2px 4px',
transition: 'all 0.15s ease-in-out',
marginRight: '6px',
@@ -76,5 +79,6 @@ export const filterTypeIconStyle = style({
marginRight: '6px',
padding: '1px 0',
display: 'flex',
+ alignItems: 'center',
color: 'var(--affine-icon-color)',
});