A rippling button with custom inputs from Tina. This component also accepts a list of callback functions that can potentially be invoked when the button is clicked if configured to.
// import a library of your choosing from react icons
import * as AntIcons from 'react-icons/ai';
import { Breadcrumbs } from 'ssw-tinacms-landingkit/dist/';
// define your callback functions
const callbackFunctions = {
"<your-callback-function>"
: ()=> {
//stub
}
}
// using with tina
<Button
callbackFunctions={callbackFunctions}
icons={AntIcons}
data={block}
/>
// manual setup
<Button
icons={AntIcons}
callbackFunctions={callbackFunctions}
data={{
callbackFunction: "Placeholder",
color: "Primary",
icon: "AiOutlineArrowRight",
iconFirst: false,
buttonText: "<your-button-text>",
}}
/>
data
: Object containing the breadcrumb contentcallbackFunction
: The name of the callback function from the dictionary the button will invoke on clickcolor
: the variant of the button ("Primary" | "Secondary")breadcrumbReplacements
: a dictionary containing the title mapping for each url segmentbuttonText
: The text that will show in the centre of the buttoncallbackFunction
: The function (supplied in the callbackFunctions prop) that will be invoked when the button is clickediconFirst
: A boolean that controls whether the icon displays before r after the text
callbackFunctions
: A dictionary of callback functions that can be invoked when the button is clicked