First component

Render a NewUI button and use a Solid signal to update its text.

Complete example

After installing the package and importing the CSS, use this example in src/App.tsx or copy the component into a route in your application.

src/App.tsx
import { createSignal } from "solid-js";
import { Button } from "@egcs/newui/actions";

export default function App() {
  const [saved, setSaved] = createSignal(false);

  return (
    <Button onClick={() => setSaved((value) => !value)}>
      {saved() ? "Saved" : "Save changes"}
    </Button>
  );
}

Interactive preview