/** * @file create-image.tsx * * @summary Raycast command to create images with various patterns and dimensions. * * Created at : 2023-07-06 14:53:50 * Last modified : 2023-07-06 16:48:08 */ import { Color, Grid } from "@raycast/api"; import { standardDimensions } from "./utilities/generators"; import SizeSelectionActionPanel from "./components/SizeSelectionActionPanel"; export default function Command() { const squareOptions = standardDimensions.map((width) => standardDimensions .filter((height) => width == height) .map((height) => { return ( } /> ); }) ); const wideOptions = standardDimensions.map((width) => standardDimensions .filter((height) => width / height > 4 / 3 && width / height < 15 / 3) .map((height) => { return ( } /> ); }) ); const tallOptions = standardDimensions.map((width) => standardDimensions .filter((height) => height / width > 4 / 3 && height / width < 15 / 3) .map((height) => { return ( } /> ); }) ); const extremeOptions = standardDimensions.map((width) => standardDimensions .filter((height) => height / width > 15 / 3 || width / height > 15 / 3) .map((height) => { return ( } /> ); }) ); return ( {squareOptions} {wideOptions} {tallOptions} {extremeOptions} ); }