PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 All 256 releases
give / src / Admin / components / Grid / index.tsx

index.tsx in GiveWP – Donation Plugin and Fundraising Platform 4.17.0, at src/Admin/components/Grid/index.tsx

46 lines 919 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import classnames from 'classnames';
2 import styles from './styles.module.scss';
3
4
5
6 /**
7 * @since 4.8.0
8 */
9 type GridProps = {
10 children: React.ReactNode;
11 ariaLabel: string;
12 };
13
14 /**
15 * @since 4.8.0
16 */
17 export default function Grid({children, ariaLabel}: GridProps) {
18 return (
19 <div className={styles.container} role="group" aria-label={ariaLabel}>
20 {children}
21 </div>
22 );
23 }
24
25 /**
26 * @since 4.8.0
27 */
28 type GridCardProps = {
29 children: React.ReactNode;
30 heading: string;
31 headingId: string;
32 className?: string;
33 };
34
35 /**
36 * @since 4.8.0
37 */
38 export function GridCard({children, heading, headingId, className}: GridCardProps) {
39 return (
40 <div className={classnames(styles.card, className)} role="region" aria-labelledby={`${headingId}-label`}>
41 <h3 id={headingId} className={styles.heading}>{heading}</h3>
42 {children}
43 </div>
44 );
45 }
46