mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
Prevent clicking on disabled sidebar items
This commit is contained in:
@@ -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 New Issue
Block a user