README.md
68 lines
| 1 | GiveBlankSlate |
| 2 | ======= |
| 3 | |
| 4 | Reusable placeholder component based on existing BlankSlate UI pattern used in the plugin when no data is found. |
| 5 | |
| 6 |  |
| 7 | |
| 8 | ## Usage |
| 9 | |
| 10 | Render a placeholder user interface when no data to display |
| 11 | |
| 12 | ```jsx |
| 13 | <GiveBlankSlate title={ __( 'Title for placeholder' ) } |
| 14 | description={ __( 'Description to provide info' ) } |
| 15 | helpLink> |
| 16 | <Button isPrimary |
| 17 | isLarge |
| 18 | href=""> |
| 19 | { __( 'Sample Button ) } |
| 20 | </Button> |
| 21 | </GiveBlankSlate> |
| 22 | ``` |
| 23 | |
| 24 | ## Props |
| 25 | |
| 26 | The component accepts the following props: |
| 27 | |
| 28 | ### noIcon |
| 29 | |
| 30 | If this property is added, Give logo will be displayed |
| 31 | |
| 32 | - Type: `bool` |
| 33 | - Required: No |
| 34 | |
| 35 | ### isLoader |
| 36 | |
| 37 | If this property is added, loading animation will be displayed instead of the logo. |
| 38 | |
| 39 | - Type: `bool` |
| 40 | - Required: No |
| 41 | |
| 42 | ### title |
| 43 | |
| 44 | If this property is added, a title text will be generated using title property as the content. |
| 45 | |
| 46 | - Type: `string` |
| 47 | - Required: No |
| 48 | |
| 49 | ### description |
| 50 | |
| 51 | If this property is added, a description text will be generated using description property as the content. |
| 52 | |
| 53 | - Type: `string` |
| 54 | - Required: No |
| 55 | |
| 56 | ### childern |
| 57 | |
| 58 | The content to be displayed within the GiveBlankSlate. Include custom content/HTML/components etc. |
| 59 | |
| 60 | - Type: `Element` |
| 61 | - Required: Yes |
| 62 | |
| 63 | ### helpLink |
| 64 | |
| 65 | Display text & link to send users to help page on the website. Content is displayed via custom reusable component "GiveHelpLink" |
| 66 | |
| 67 | - Type: `bool` |
| 68 | - Required: no |