Skip to content

Commit

Permalink
fix(component): click area of the item (#2221)
Browse files Browse the repository at this point in the history
Co-authored-by: Himself65 <himself65@outlook.com>
  • Loading branch information
fundon and himself65 authored May 4, 2023
1 parent 3d43e61 commit 238f69b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ export const StyledListItem = styled('div')<{
color: active
? 'var(--affine-primary-color)'
: 'var(--affine-text-primary-color)',
paddingLeft: '16px',
paddingLeft: '2px',
paddingRight: '2px',
borderRadius: '8px',
cursor: 'pointer',
marginBottom: '4px',
position: 'relative',
flexShrink: 0,
userSelect: 'none',
...displayFlex('flex-start', 'center'),
...displayFlex('flex-start', 'stretch'),
...(disabled
? {
cursor: 'not-allowed',
color: 'var(--affine-border-color)',
}
: {}),

'> svg, a > svg': {
'a > svg, div > svg': {
fontSize: '20px',
marginLeft: '14px',
marginRight: '12px',
color: active
? 'var(--affine-primary-color)'
Expand Down
13 changes: 11 additions & 2 deletions apps/web/src/components/root-app-sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,17 @@ export const RootAppSidebar = ({
onOpenQuickSearchModal();
}, [onOpenQuickSearchModal])}
>
<SearchIcon />
{t['Quick search']()}
<div
style={{
display: 'flex',
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
}}
>
<SearchIcon />
{t['Quick search']()}
</div>
</StyledListItem>
<StyledListItem
active={
Expand Down
3 changes: 1 addition & 2 deletions packages/component/src/components/changeLog/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export const changeLogSlideInStyle = style({
// fixme: if width is 100% and marginLeft is 0,
// the UI will overflow on app sidebar
width: '99%',
marginLeft: '2px',
height: '32px',
display: 'flex',
justifyContent: 'space-between',
Expand All @@ -78,7 +77,7 @@ export const changeLogSlideInStyle = style({
backgroundColor: 'var(--affine-tertiary-color)',
border: '1px solid var(--affine-primary-color)',
borderRight: 'none',
paddingLeft: '8px',
paddingLeft: '14px',
borderRadius: '16px 0 0 16px',
cursor: 'pointer',
zIndex: 1001,
Expand Down

2 comments on commit 238f69b

@vercel
Copy link

@vercel vercel bot commented on 238f69b May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

affine-storybook – ./packages/component

affine-storybook-toeverything.vercel.app
affine-storybook-git-master-toeverything.vercel.app
affine-storybook.vercel.app
storybook.affine.pro

@vercel
Copy link

@vercel vercel bot commented on 238f69b May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.