Skip to content

Commit

Permalink
feat(start-menu): fix UI and improve dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
mukuljainx committed May 20, 2021
1 parent 06ad88e commit cc2eedf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/atoms/styled/appImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const Image = ({ name, size, ref, height, width, ...rest }: IProps) => {
{...rest}
height={height || size}
width={width || size}
draggable={false}
src={href ? href : require(`./assets/${iconName}`).default}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/molecules/startMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Wrapper = styled(animated.div)`
}
${Partial}:last-child {
width: ${120 * 4 + 32 + 16}px;
width: ${120 * 4 + 32 + 24}px;
}
${Partial}:not(:last-child) {
Expand Down
3 changes: 2 additions & 1 deletion src/molecules/startMenu/quickPick/appBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from "react";
import styled from "styled-components";
import { capitalize } from "lodash-es";

import Image from "atoms/styled/appImage";
import { Stack, Text } from "atoms/styled";
Expand Down Expand Up @@ -28,7 +29,7 @@ const QucikPick = ({ icon, name, ref, ...rest }: IProps) => {
return (
<Block {...rest} alignItems="center" justifyContent="center">
<Image name={icon} size={48} />
<StyledText className="ellipsis">{name}</StyledText>
<StyledText className="ellipsis">{capitalize(name)}</StyledText>
</Block>
);
};
Expand Down
3 changes: 2 additions & 1 deletion src/molecules/startMenu/quickPick/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const AppWrapper = styled(Stack)`
overflow: auto;
flex-wrap: wrap;
position: relative;
overflow-x: hidden;
`;

const AnimatedWrapper = styled(animated.div)`
Expand Down Expand Up @@ -231,7 +232,7 @@ const QucikPick = ({}: IProps) => {
width: 128 * apps[i].width - 8,
height: 120,
}}
name={apps[i].name + " " + i}
name={apps[i].name}
icon={apps[i].name}
/>
</AnimatedWrapper>
Expand Down

0 comments on commit cc2eedf

Please sign in to comment.