File tree Expand file tree Collapse file tree 1 file changed +47
-3
lines changed
Expand file tree Collapse file tree 1 file changed +47
-3
lines changed Original file line number Diff line number Diff line change 1- {% renderInstallation %} {% endrenderInstallation %}
2-
31<style >
42pf-button + pf-button {
53 margin-inline-start : 4px ;
@@ -8,9 +6,12 @@ pf-button + pf-button {
86</style >
97
108<script type =" module " >
11- import ' @patternfly/elements/pf-icon/pf-icon.js' ;
9+ import ' @patternfly/elements/pf-icon/pf-icon.js' ;
10+ import ' @patternfly/elements/pf-tabs/pf-tabs.js' ;
1211</script >
1312
13+ {% renderInstallation %} {% endrenderInstallation %}
14+
1415{% renderOverview %}
1516
1617<div class =" overview-buttons " >
@@ -70,6 +71,49 @@ import '@patternfly/elements/pf-icon/pf-icon.js';
7071 <pf-button >Medium Button</pf-button >
7172 <pf-button size =" large " >Large Button</pf-button >
7273 {% endhtmlexample %}
74+
75+ ### Click listeners
76+
77+ <pf-tabs class =" html-lit-react-snippets " >
78+ <pf-tab slot =" tab " >HTML</pf-tab >
79+ <pf-tab-panel >
80+
81+ ``` html
82+ <script type =" module" >
83+ import ' @patternfly/elements/pf-button/pf-button.js' ;
84+ </script >
85+ <pf-button onclick =" console.log('clicked!');" >
86+ Click me!
87+ </pf-button >
88+ ```
89+
90+ </pf-tab-panel >
91+ <pf-tab slot =" tab " >Lit</pf-tab >
92+ <pf-tab-panel >
93+
94+ ``` js
95+ import ' @patternfly/elements/pf-button/pf-button.js' ;
96+ html `
97+ <pf-button @click =" ${() => console.log('clicked!');}" >
98+ Click me!
99+ </pf-button >
100+ ` ;
101+ ```
102+
103+ </pf-tab-panel >
104+ <pf-tab slot =" tab " >React</pf-tab >
105+ <pf-tab-panel >
106+
107+ ``` jsx
108+ import { Button } from ' @patternfly/elements/react/pf-button/pf-button.js' ;
109+ < Button onClick= {() => console .log (' clicked!' );}>
110+ Click me!
111+ < / Button>
112+ ```
113+
114+ </pf-tab-panel >
115+ </pf-tabs >
116+
73117{% endband %}
74118
75119{% renderSlots %}{% endrenderSlots %}
You can’t perform that action at this time.
0 commit comments