PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / AutoLaunch / templates / heading.jsx

heading.jsx in Extendify 3.2.1, at src/AutoLaunch/templates/heading.jsx

37 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { chevronLeft, Icon } from '@wordpress/icons';
2
3 const TITLE = [
4 'text-ui-heading md:text-ui-heading-lg text-pretty text-ui-page-text',
5 'font-ui-heading font-ui-strong tracking-ui-heading p-0 m-0 text-center',
6 ].join(' ');
7
8 const SUBTITLE = [
9 'text-sm md:text-ui-body text-pretty text-ui-page-text font-ui-body',
10 'opacity-70 p-0 m-0 text-center max-w-xl',
11 ].join(' ');
12
13 const LINK = [
14 'inline-flex items-center gap-0.5 border-0 bg-transparent cursor-pointer',
15 'text-sm text-ui-page-text opacity-70 hover:opacity-100 transition-opacity',
16 ].join(' ');
17
18 export const Heading = ({ title, subtitle }) => (
19 <div className="flex flex-col items-center gap-2">
20 <h2 className={TITLE}>{title}</h2>
21 {subtitle && <p className={SUBTITLE}>{subtitle}</p>}
22 </div>
23 );
24
25 export const PageLink = ({ label, href, icon = chevronLeft, onClick }) =>
26 href ? (
27 <a className={LINK} href={href} onClick={onClick}>
28 <Icon fill="currentColor" icon={icon} size={20} />
29 {label}
30 </a>
31 ) : (
32 <button className={LINK} type="button" onClick={onClick}>
33 <Icon fill="currentColor" icon={icon} size={20} />
34 {label}
35 </button>
36 );
37