mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 16:19:43 +08:00
chore: add responsive styles for workspace card (#2390)
This commit is contained in:
@@ -61,6 +61,9 @@ export const StyledCard = styled('div')<{
|
|||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'@media (max-width: 720px)': {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { style } from '@vanilla-extract/css';
|
||||||
|
|
||||||
|
export const workspaceItemStyle = style({
|
||||||
|
'@media': {
|
||||||
|
'screen and (max-width: 720px)': {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -13,6 +13,7 @@ import { SortableContext, useSortable } from '@dnd-kit/sortable';
|
|||||||
import type { FC } from 'react';
|
import type { FC } from 'react';
|
||||||
|
|
||||||
import { WorkspaceCard } from '../workspace-card';
|
import { WorkspaceCard } from '../workspace-card';
|
||||||
|
import { workspaceItemStyle } from './index.css';
|
||||||
|
|
||||||
export type WorkspaceListProps = {
|
export type WorkspaceListProps = {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
@@ -42,6 +43,7 @@ const SortableWorkspaceItem: FC<
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className={workspaceItemStyle}
|
||||||
data-testid="draggable-item"
|
data-testid="draggable-item"
|
||||||
style={style}
|
style={style}
|
||||||
ref={setNodeRef}
|
ref={setNodeRef}
|
||||||
|
|||||||
Reference in New Issue
Block a user