Skip to content

Instantly share code, notes, and snippets.

View kylebuch8's full-sized avatar

Kyle Buchanan kylebuch8

View GitHub Profile
<template>
<div>
<h1>PatternFly Elements with Vue</h1>
<pfe-card color="lightest" border>
<img
alt="From https://picsum.photos/"
overflow="left right top"
src="https://picsum.photos/id/1019/300/200"
>
<p>
function App() {
const accordion = useRef();
useEffect(() => {
});
return (
<div className="App">
<h1>PatternFly Elements with React</h1>
<pfe-accordion>
<pfe-accordion-header>
<h3>Why do wizards need money if they could just create it?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>
There is legislation that decides what you can conjure and what you can
not. Because things that you conjure out of thin air will not last, it
is illegal in the wizarding world.
</p>
function App() {
return (
<div className="App">
<h1>PatternFly Elements with React</h1>
<pfe-card color="lightest">
<img
alt="From https://picsum.photos/"
overflow="left right top"
src="https://picsum.photos/id/1019/300/200"
/>
<pfe-accordion>
<pfe-accordion-header>
<h3>Why do wizards need money if they could just create it?</h3>
</pfe-accordion-header>
<pfe-accordion-panel>
<p>
There is legislation that decides what you can conjure and what you can
not. Because things that you conjure out of thin air will not last, it
is illegal in the wizarding world.
</p>
@kylebuch8
kylebuch8 / app.component.html
Last active December 11, 2020 21:04
app.component.html file in an Angular app
<h1>Angular App with PatternFly Elements</h1>
<pfe-card color="lightest" border>
<img
alt="From https://picsum.photos/"
overflow="left right top"
src="https://picsum.photos/id/1019/300/200"
/>
<p>This is the light pfe-card and <a href="#">a link</a>.</p>
<p>
Leverage agile frameworks to provide a robust synopsis for high level
@kylebuch8
kylebuch8 / simple-pfelement-constructor-delay-render.js
Last active March 20, 2019 17:13
Simple PFElement Constructor with delayRender
// the location of pfelement.js may be different if you're not building an element in the
// PatternFly elements repository
import PFElement from "../pfelement/pfelement.js";
class MySimplePfelement extends PFElement {
constructor() {
// make sure we call super() first with the class we're using
// as the first argument
// the second argument in super() is an object with delayRender: true
@kylebuch8
kylebuch8 / simple-pfelement-constructor.js
Last active March 20, 2019 17:14
Simple PFElement Constructor
// the location of pfelement.js may be different if you're not building an element in the
// PatternFly elements repository
import PFElement from "../pfelement/pfelement.js";
class MySimplePfelement extends PFElement {
constructor() {
// make sure we call super() first with the class we're using
// as the first argument
super(MySimplePfelement);
class SimpleComponent extends HTMLElement {
constructor() {
// calling super first
super();
// setting some initial state
this.counter = 0;
this.active = false;
// adding an event listener
@kylebuch8
kylebuch8 / constructor.js
Last active March 14, 2019 15:58
Constructors in PatternFly Elements
import PFElement from "../pfelement/pfelement.js";
class MyPfelement extends PFElement {
constructor() {
// you must call this first
super(MyPfelement);
}
}