import { mergeProps } from "solid-js";
import utils from "../utils/index"

import "./water.css"

function water(props) {
    const parentProps = mergeProps(props);
    console.log(Math.ceil(parentProps.percentage / 100 * 80))
    return <div id="waterBox" className="waterBox">
        <div class="wave">
            <div className="wave-text">
                {parentProps.text}
                <p>{parentProps.percentage}%</p>
            </div>
            <div class="wave-mask" style={'top:' + (240 - Math.ceil(parentProps.percentage / 100 * 80)) + '%'}></div>
        </div>
    </div>
}

export default water;
