Files
pixelstreamingwebreact/src/components/mainPart/button.tsx
T

21 lines
545 B
TypeScript

import React from "react";
type TProps = {
textButton: string
onClick?: () => void
type?: 'submit' | 'button'
width?: '100%' | string
}
export const PinkButton:React.FC<TProps> = React.memo((props) => {
return <button
style={{width: props.width ? props.width : ''}}
className="main-part-text-button"
onClick={() => {
return props?.onClick ? props.onClick() : null;
}}
type={props.type ? props.type : 'button'}
>
{props.textButton}
</button>
})