chore: clean styles
This commit is contained in:
@@ -21,19 +21,6 @@ const SceneMap: Record<RecastScene, ComponentType<CreateView>> = {
|
|||||||
kanban: SceneKanban,
|
kanban: SceneKanban,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const GroupBox = styled('div')(({ theme }) => {
|
|
||||||
return {
|
|
||||||
'&:hover': {
|
|
||||||
// Workaround referring to other components
|
|
||||||
// See https://emotion.sh/docs/styled#targeting-another-emotion-component
|
|
||||||
// [GroupActionWrapper.toString()]: {},
|
|
||||||
'& > *': {
|
|
||||||
visibility: 'visible',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
const GroupActionWrapper = styled('div')(({ theme }) => ({
|
const GroupActionWrapper = styled('div')(({ theme }) => ({
|
||||||
height: '30px',
|
height: '30px',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@@ -59,6 +46,14 @@ const GroupActionWrapper = styled('div')(({ theme }) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const GroupBox = styled('div')({
|
||||||
|
'&:hover': {
|
||||||
|
[GroupActionWrapper.toString()]: {
|
||||||
|
visibility: 'visible',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const GroupContainer = styled('div')<{ isSelect?: boolean }>(
|
const GroupContainer = styled('div')<{ isSelect?: boolean }>(
|
||||||
({ isSelect, theme }) => ({
|
({ isSelect, theme }) => ({
|
||||||
background: theme.affine.palette.white,
|
background: theme.affine.palette.white,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const AddViewMenu = () => {
|
|||||||
onClick={() => setActivePanel(!activePanel)}
|
onClick={() => setActivePanel(!activePanel)}
|
||||||
>
|
>
|
||||||
<AddViewIcon fontSize="small" />
|
<AddViewIcon fontSize="small" />
|
||||||
<span>Add View</span>
|
<span style={{ userSelect: 'none' }}>Add View</span>
|
||||||
{activePanel && (
|
{activePanel && (
|
||||||
<Panel>
|
<Panel>
|
||||||
<PanelItem>
|
<PanelItem>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const ViewsMenu = () => {
|
|||||||
useRecastView();
|
useRecastView();
|
||||||
|
|
||||||
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
||||||
setViewName(e.target.value.trim());
|
setViewName(e.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
|
const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
|
||||||
@@ -36,7 +36,7 @@ export const ViewsMenu = () => {
|
|||||||
}
|
}
|
||||||
await updateView({
|
await updateView({
|
||||||
...activeView,
|
...activeView,
|
||||||
name: viewName,
|
name: viewName.trim(),
|
||||||
type: viewType,
|
type: viewType,
|
||||||
});
|
});
|
||||||
setActiveView(null);
|
setActiveView(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user