Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from "react";
import PropTypes from "prop-types";
import RawButton from "@paprika/raw-button";
import { size } from "@paprika/helpers/lib/types";
import { useDispatch, useDataTableState } from "../..";
import { plugins } from "../../constants";
const propTypes = {
defaultHeight: PropTypes.oneOf([size.XSMALL, size.SMALL, size.MEDIUM, size.LARGE]),
};
const defaultProps = {
defaultHeight: size.XSMALL,
};
function getIndexByValue(value, values) {
return values.indexOf(values.find(item => item === value));
}
function getNextIndex(index, values) {
if (index + 1 >= values.length) {
return 0;
}
return index + 1;