Customization
Custom class names
You can customize / white-label the exported Form component using these specific class names
1. df-sdk-create-btn
df-sdk-create-btn
Add CSS styles like this:
.df-sdk-create-btn {
background: #0275d8 !important;
}
And import them into component page like this:
import { CreateFarm } from "@cryption/dapp-factory-sdk";
import "./Farm.css"; // imported CSS file
const Farm = () => {
return <CreateFarm />;
};
export default Farm;
Result:

Similar to this example you can style other buttons with classes like:
2. df-sdk-next-btn
df-sdk-next-btn

3. df-sdk-previous-btn
df-sdk-previous-btn

4. df-sdk-cancel-btn
df-sdk-cancel-btn

5. df-sdk-confirm-create-btn
df-sdk-confirm-create-btn

6. df-sdk-form-container
df-sdk-form-container
.df-sdk-form-container {
background: #0275d8 !important;
}

7. df-sdk-card-container
df-sdk-card-container

You can customize / white-label the exported Button component using this class.
1. df-sdk-single-btn
df-sdk-single-btn
.df-sdk-single-btn {
background: #ffffff !important;
border: 2px solid #0275d8 !important;
color: #0275d8 !important;
}
import { CreateFarmButton } from "@cryption/dapp-factory-sdk";
import "./Farm.css";
const Farm = () => {
return <CreateFarmButton />;
};
export default Farm;

Custom Gradients
Both Form as well as Button components accept a prop customGradient : string
to customize the gradient styles present throughout the component
Eg:
import { CreateFarm, CreateFarmButton } from "@cryption/dapp-factory-sdk";
const Farm = () => {
return (
<>
<CreateFarmButton
title="Create new Farm"
customGradient="linear-gradient(to right, red, yellow)"
/>
<CreateFarm customGradient="linear-gradient(to right, red, yellow)" />
</>
);
};
export default Farm;

Last updated