import React, { useState } from 'react'; const RadicalWidget: React.FC = () => { const [power, setPower] = useState(3); const [root, setRoot] = useState(2); return (
setPower(parseInt(e.target.value))} className="flex-1 h-2 bg-violet-100 rounded-lg accent-violet-600" /> {power}
setRoot(parseInt(e.target.value))} className="flex-1 h-2 bg-fuchsia-100 rounded-lg accent-fuchsia-600" /> {root}
{/* Rational Exponent Form */}
x {power} / {root}
= {/* Radical Form */}
{root} x {power}

The Golden Rule: The top number stays with x (power), the bottom number becomes the root.

Exponent {power} goes inside. Root {root} goes outside.

); }; export default RadicalWidget;