PrefillBillingAddressCheckboxComponentConfig
View the reference for the PrefillBillingAddressCheckboxComponentConfig
file.
Reference
import prefillBillingAddressCheckboxConfig from "@pxpio/web-components-sdk/src/components/prefillBillingAddressCheckboxComponents/types/PrefillBillingAddressCheckboxComponentConfig";
const prefillBillingAddressCheckboxConfig: PrefillBillingAddressCheckboxComponentConfig = {
label: string,
labelStyles: {
checked: {
color: string,
fontWeight: string,
fontSize: string
},
unchecked: {
color: string,
fontSize: string
}
},
checked: boolean,
checkedColor: string,
tabIndex: number
};
const prefillBillingAddressCheckbox = pxpCheckoutSdk.create("prefill-billing-address-checkbox");
Properties
Property | Description |
---|---|
label string | The text label to display next to the pre-fill billing address checkbox. |
labelStyles object | Custom styles for the pre-fill billing address checkbox's label. |
labelStyles.checked object | Details about the styles to apply the checkbox is checked. |
labelStyles.checked.color string | The HEX colour code of the text. |
labelStyles.checked.fontWeight string | The weight of the font. |
labelStyles.checked.fontSize string | The size of the font. |
labelStyles.unchecked object | Details about the styles to apply when the checkbox is unchecked. |
labelStyles.unchecked.color string | The HEX colour code of the text. |
labelStyles.unchecked.fontSize string | The size of the font. |
checked boolean | The initial state of the checkbox. |
checkedColor string | The HEX colour code of the checkbox, when checked. |
tabIndex number | The tab index of the component. |
Example
const prefillBillingAddressCheckboxConfig: PrefillBillingAddressCheckboxComponentConfig = {
label: "Same as shipping address",
labelStyles: {
checked: {
color: "#4CAF50",
fontWeight: "bold",
fontSize: "14px"
},
unchecked: {
color: "#666666",
fontSize: "14px"
}
},
checked: false,
checkedColor: "#4CAF50",
tabIndex: 1,
};
const prefillBillingAddressCheckbox = pxpCheckoutSdk.create("prefill-billing-address-checkbox");
Updated 15 days ago