refactor(controls): use button element for buttons instead of divs closes #1228
This commit is contained in:
@@ -23,12 +23,12 @@ export interface ControlProps extends HTMLAttributes<HTMLDivElement> {
|
|||||||
onInteractiveChange?: (interactiveStatus: boolean) => void;
|
onInteractiveChange?: (interactiveStatus: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ControlButtonProps extends HTMLAttributes<HTMLDivElement> {}
|
export interface ControlButtonProps extends HTMLAttributes<HTMLButtonElement> {}
|
||||||
|
|
||||||
export const ControlButton: FC<ControlButtonProps> = ({ children, className, ...rest }) => (
|
export const ControlButton: FC<ControlButtonProps> = ({ children, className, ...rest }) => (
|
||||||
<div className={cc(['react-flow__controls-button', className])} {...rest}>
|
<button className={cc(['react-flow__controls-button', className])} {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
||||||
const Controls: FC<ControlProps> = ({
|
const Controls: FC<ControlProps> = ({
|
||||||
|
|||||||
@@ -171,6 +171,7 @@
|
|||||||
&-button {
|
&-button {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
border: none;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user