import React from "react"; import PropTypes from "prop-types"; export default function Toolbar(props) { const { cropping } = props.cropState; const aspectRatios = [ ["Free", null], ["1:1", 1], ["3:2", 3/2], ["2:3", 2/3], ["4:3", 4/3], ["3:4", 3/4], ["5:4", 5/4], ["4:5", 4/5], ["16:9", 16/9] ]; const updateAspect = (ratio) => (evt) => { evt.preventDefault(); props.setAspect(ratio); }; const width = Math.ceil(props.cropState.crop_width); const height = Math.ceil(props.cropState.crop_height); const format = props.image.content_type.split("/")[1].toUpperCase(); return (