BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
import * as React from "react";
import { render } from "react-dom";
import { ButtonComponent } from "@syncfusion/ej2-react-buttons";
import "./index.css";
export const Test = () => {
const [showFirstButton, setShowFirstButton] = React.useState(true);
const click = () => {
setShowFirstButton(false);
};
return (
<div>
<h4>Conditional Button Rendering</h4>
{showFirstButton ? (
<ButtonComponent cssClass="e-primary" onClick={click}>
First Button
</ButtonComponent>
) : (
<ButtonComponent cssClass="e-success">Second Button</ButtonComponent>
)}
</div>
);
};
render(<Test />, document.getElementById("sample"));
|
className |
cssClass |
This is the react specific attribute used to specify css style as like normal class attribute. |
This is Syncfusion Button control property used to specify css class for the Button control. |