Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/static/js/options/options/ct-button.js
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
import { Fragment, createElement, Component } from '@wordpress/element'
2
+
3
+
const Button = ({ option: { text = '', attr = {}, panel, url } }) => (
4
+
<a
5
+
{...{
6
+
...(attr || {})
7
+
}}
8
+
href={url}
9
+
target="_blank"
10
+
onClick={e => {
11
+
return
12
+
e.preventDefault()
13
+
14
+
if (panel && wp.customize && wp.customize.panel(panel)) {
15
+
wp.customize.panel(panel).expand()
16
+
return
17
+
}
18
+
19
+
url && location.assign(url)
20
+
}}>
21
+
{text}
22
+
</a>
23
+
)
24
+
25
+
export default Button
26
+