'use client'; import { bool, string } from 'prop-types'; import { RippleArea } from '../../ripple/ripple-area'; import { ButtonLayoutProps } from './button-layout.types'; import useRippleEffect from '../../ripple/hooks/useRippleEffect'; import React, { forwardRef, useId, useRef, useState } from 'react'; export const ButtonLayout = forwardRef( ({ centralRipple = false, ...props }, ref) => { const [isActive, setIsActive] = useState(false), ripplesRef = useRef(null), buttonId = useId(), events = useRippleEffect(ripplesRef, setIsActive); const classes = `m3${isActive ? ' is-active' : ''} ${props.className ?? ''}`.trimEnd(); return ( ); }, ); ButtonLayout.propTypes = { children: string, centralRipple: bool, };