active: ['4px', 'solid', ...primary.light],
xsActive: ['3px', 'solid', ...primary.light],
focus: ['4px', 'solid', ...secondary.default, OPACITY_20_PERCENT],
+ heavy: ['2px', 'solid', ...COLORS.grey[50]],
},
avatar: {
}
};
+ handleSelectRule = (key: string) => {
+ this.routeSelectedRulePath(key);
+ };
+
selectPreviousRule = () => {
const { rules } = this.state;
const selectedIndex = this.getSelectedIndex();
onOpen={this.handleRuleOpen}
rule={rule}
selected={rule.key === selected}
+ selectRule={this.handleSelectRule}
selectedProfile={this.getSelectedProfile()}
/>
))}
const displayedKey = ruleDetails.key.startsWith(EXTERNAL_PREFIX)
? ruleDetails.key.substring(EXTERNAL_PREFIX.length)
: ruleDetails.key;
- return <Note className="sw-overflow-hidden sw-text-ellipsis">{displayedKey}</Note>;
+ return (
+ <Note className="sw-overflow-hidden sw-text-ellipsis" title={displayedKey}>
+ {displayedKey}
+ </Note>
+ );
}
render() {
onOpen: (ruleKey: string) => void;
rule: Rule;
selected: boolean;
+ selectRule: (key: string) => void;
selectedProfile?: Profile;
}
}
event.preventDefault();
+ event.stopPropagation();
this.props.onOpen(this.props.rule.key);
};
className="it__coding-rule sw-p-3 sw-mb-4 sw-rounded-1 sw-bg-white"
aria-current={selected}
data-rule={rule.key}
+ onClick={() => this.props.selectRule(rule.key)}
>
<div className="sw-flex sw-flex-col">
<div className="sw-mb-4">
}
const ListItemStyled = styled.li<{ selected: boolean }>`
- border: ${(props) =>
- props.selected ? themeBorder('default', 'primary') : themeBorder('default', 'almCardBorder')};
-
- border-width: ${(props) => (props.selected ? '2px' : '1px')};
+ outline: ${(props) =>
+ props.selected ? themeBorder('heavy', 'primary') : themeBorder('default', 'almCardBorder')};
+ outline-offset: ${(props) => (props.selected ? '-2px' : '-1px')};
`;