--- interface Props { color?: string | undefined; } import colors from '../config/colors.json'; if (Astro.props.color === undefined) { Astro.props.color = colors[Math.floor(Math.random() * colors.length)]; } const { color } = Astro.props; ---