mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
rename handleXXX to onXX events
This commit is contained in:
@@ -37,7 +37,7 @@ export const ToggleButton: FC<ToggleButtonProps> = ({
|
||||
tooltip,
|
||||
onChange,
|
||||
}) => {
|
||||
const handleChange = event => {
|
||||
const onClick = event => {
|
||||
event.stopPropagation();
|
||||
if (onChange) {
|
||||
onChange(value);
|
||||
@@ -46,7 +46,7 @@ export const ToggleButton: FC<ToggleButtonProps> = ({
|
||||
|
||||
const btnClassName = `btn ${className} ${selected ? 'active' : ''}`;
|
||||
const button = (
|
||||
<button className={btnClassName} onClick={handleChange}>
|
||||
<button className={btnClassName} onClick={onClick}>
|
||||
<span>{children}</span>
|
||||
</button>
|
||||
);
|
||||
|
Reference in New Issue
Block a user