Pushing overhaul.

This commit is contained in:
dan612
2025-12-06 16:34:43 -05:00
parent 09043d7884
commit 8cee39a6df
19 changed files with 34347 additions and 143 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
import React, { Component } from 'react';
function Button(props) {
return <button className={"btn btn-" + props.classes}><a href={props.link}>{ props.text }</a></button>;
}
export default Button;

View File

@@ -0,0 +1,16 @@
import React, { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}
export default Counter;

View File

@@ -0,0 +1,14 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import Button from './components/Button';
import Counter from './components/Counter';
const container = document.getElementById('react-block');
const root = createRoot(container);
root.render(
<div>
<Button text="Click me" link="https://www.drupal.org" classes="primary" />
<Counter />
</div>
);