mirror of
https://github.com/elementor/hello-theme.git
synced 2026-07-31 15:53:48 +08:00
Some checks failed
Build / Build theme (push) Failing after 1s
Lint / ESLint (push) Failing after 0s
PHPUnit / File Diff (push) Failing after 1s
Lint / PHPCS (push) Failing after 41s
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - Test Results (push) Successful in 2s
* Setup prettier * Fix lint/format issues
29 lines
749 B
JavaScript
29 lines
749 B
JavaScript
import Stack from '@elementor/ui/Stack';
|
|
import Typography from '@elementor/ui/Typography';
|
|
import Link from '@elementor/ui/Link';
|
|
import { decode } from 'html-entities';
|
|
|
|
const LinkOrTitle = ({ title, link, sublinks, onClick, target }) => (
|
|
<Stack direction="column">
|
|
<Typography variant="subtitle1" color="text.primary">
|
|
{link && 0 === sublinks.length ? (
|
|
<Link
|
|
color="inherit"
|
|
underline="hover"
|
|
onClick={onClick}
|
|
href={link}
|
|
target={target}
|
|
sx={{ lineHeight: 'initial', fontWeight: 'normal' }}
|
|
>
|
|
{decode(title)}
|
|
</Link>
|
|
) : (
|
|
<span style={{ lineHeight: 'initial', fontWeight: 'normal' }}>
|
|
{decode(title)}
|
|
</span>
|
|
)}
|
|
</Typography>
|
|
</Stack>
|
|
);
|
|
|
|
export default LinkOrTitle;
|