Skip to content

Commit

Permalink
fix: styles
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Feb 14, 2025
1 parent ace25f1 commit fdcae89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function StyledRadio(props) {
<Radio
disableRipple
color="default"
size="small"
sx={{
'&.Mui-checked': {
color: 'rgb(19, 115, 230)',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import classNames from 'classnames';
import React from 'react';
import { styled } from 'styled-components';

Expand All @@ -13,13 +14,15 @@ const SidebarItemDiv = styled.div<{ $visible?: boolean; $height?: string }>`
? `1`
: 'unset'};
color: #545454;
border-bottom: 1px solid transparent;
border-color: ${(props) => (props.$visible ? '#eee' : 'transparent')};
`;

const Chevron = styled.a<{ $visible: boolean }>`
transform: rotate(${(props) => (props.$visible ? 180 : 0)}deg);
svg {
width: 8px;
height: 8px;
width: 10px;
height: 10px;
}
`;

Expand All @@ -30,6 +33,7 @@ export type SidebarItemProps = {
visible?: boolean;
onChange?: (bool: boolean) => void;
children?: React.ReactNode;
className?: string;
};

const HeaderDiv = styled.div`
Expand All @@ -47,12 +51,13 @@ export const SidebarItem: React.FC<SidebarItemProps> = ({
children,
height,
onChange,
className,
}) => {
return (
<SidebarItemDiv
$visible={visible}
$height={height}
className="flex flex-col"
className={classNames('flex flex-col', className)}
>
<HeaderDiv
onClick={() => {
Expand All @@ -67,7 +72,7 @@ export const SidebarItem: React.FC<SidebarItemProps> = ({
<h2 className="text-xs uppercase">{title}</h2>
</div>
<Chevron $visible={visible}>
<Arrow />
<Arrow viewBox="-2 -1 12 12" />
</Chevron>
</HeaderDiv>
{visible ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const Sidebar = () => {
height={!layersVisible ? 'full' : '55%'}
visible={toolbarVisible}
onChange={(val) => setToolbarVisible(val)}
className="overflow-auto"
>
<Toolbar />
</SidebarItem>
Expand Down

0 comments on commit fdcae89

Please sign in to comment.