Skip to content

Commit

Permalink
fix(layer-selector): remove deprecated default propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Jun 13, 2024
1 parent c6adda4 commit 5a45ad4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/layer-selector/src/LayerSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ const createLayerFactories = (

const ConditionalWrapper = ({ condition, wrapper, children }) =>
condition ? wrapper(children) : children;
const LayerSelector = (props) => {
const LayerSelector = (
props = {
makeExpandable: true,
position: 'top-right',
showOpacitySlider: false,
},
) => {
const [layers, setLayers] = useState({
baseLayers: [],
overlays: [],
Expand Down Expand Up @@ -415,7 +421,6 @@ const LayerSelector = (props) => {
]);

const onItemChanged = (event, props) => {
console.log('LayerSelector.onItemChanged', props);
const overlays = layers.overlays;
const baseLayers = layers.baseLayers;

Expand Down Expand Up @@ -573,12 +578,6 @@ LayerSelector.propTypes = {
showOpacitySlider: PropTypes.bool,
};

LayerSelector.defaultProps = {
makeExpandable: true,
position: 'top-right',
showOpacitySlider: false,
};

LayerSelectorItem.propTypes = {
onChange: PropTypes.func.isRequired,
selected: PropTypes.bool.isRequired,
Expand Down

0 comments on commit 5a45ad4

Please sign in to comment.