ExistingUserIntroModal.module.scss
1 year ago
StepDetails.tsx
1 year ago
icons.tsx
1 year ago
index.tsx
1 year ago
StepDetails.tsx
42 lines
| 1 | import {stepConfig} from '@givewp/campaigns/admin/components/ExistingUserIntroModal/index'; |
| 2 | import styles from './ExistingUserIntroModal.module.scss'; |
| 3 | |
| 4 | /** |
| 5 | * @since 4.0.0 |
| 6 | */ |
| 7 | |
| 8 | type StepDetailsProps = { |
| 9 | stepConfig: stepConfig; |
| 10 | handleClick: () => void; |
| 11 | }; |
| 12 | |
| 13 | export function StepDetails({stepConfig, handleClick}: StepDetailsProps) { |
| 14 | return ( |
| 15 | <div className={styles.details}> |
| 16 | {stepConfig.badge && stepConfig.badge()} |
| 17 | |
| 18 | <strong className={styles.title}>{stepConfig.title}</strong> |
| 19 | <p className={styles.description}>{stepConfig.description}</p> |
| 20 | |
| 21 | <div className={styles.actions}> |
| 22 | {stepConfig.linkText && ( |
| 23 | <a |
| 24 | href="https://docs.givewp.com/campaigns-release" |
| 25 | target="_blank" |
| 26 | rel="noreferrer" |
| 27 | className={`${styles.button} ${styles.link}`} |
| 28 | > |
| 29 | {stepConfig.linkText} |
| 30 | </a> |
| 31 | )} |
| 32 | |
| 33 | {stepConfig.buttonText && ( |
| 34 | <button className={styles.button} onClick={handleClick}> |
| 35 | {stepConfig.buttonText} |
| 36 | </button> |
| 37 | )} |
| 38 | </div> |
| 39 | </div> |
| 40 | ); |
| 41 | } |
| 42 |