Prevent clicking on disabled sidebar items
This commit is contained in:
parent
d96c0d547a
commit
5b98238b3a
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ const Container = styled(Flex)<{ $active?: boolean; $disabled?: boolean }>`
|
||||||
border-right: var(--sidebar-border);
|
border-right: var(--sidebar-border);
|
||||||
cursor: ${(props) => (props.$disabled ? 'default' : 'pointer')};
|
cursor: ${(props) => (props.$disabled ? 'default' : 'pointer')};
|
||||||
opacity: ${(props) => props.$disabled && 0.6};
|
opacity: ${(props) => props.$disabled && 0.6};
|
||||||
|
user-select: ${(props) => (props.$disabled ? 'none' : 'initial')};
|
||||||
|
pointer-events: ${(props) => (props.$disabled ? 'none' : 'all')};
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
fill: ${(props) => (props.$active ? 'var(--primary-color)' : 'var(--sidebar-fg)')};
|
fill: ${(props) => (props.$active ? 'var(--primary-color)' : 'var(--sidebar-fg)')};
|
||||||
|
|
Reference in a new issue