Added UI elements for the new drawing system
Removed old gesture system Refactored map interaction into separate component
This commit is contained in:
22
src/components/map/controls/RadioIconButton.js
Normal file
22
src/components/map/controls/RadioIconButton.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import { IconButton } from "theme-ui";
|
||||
|
||||
function RadioIconButton({ title, onClick, isSelected, disabled, children }) {
|
||||
return (
|
||||
<IconButton
|
||||
aria-label={title}
|
||||
title={title}
|
||||
onClick={onClick}
|
||||
sx={{ color: isSelected ? "primary" : "text" }}
|
||||
disabled={disabled}
|
||||
>
|
||||
{children}
|
||||
</IconButton>
|
||||
);
|
||||
}
|
||||
|
||||
RadioIconButton.defaultProps = {
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
export default RadioIconButton;
|
||||
Reference in New Issue
Block a user