deepyr 0.1.2
deepyr: ^0.1.2 copied to clipboard
A type-safe Dart implementation of DaisyUI components for Jaspr, providing a fluent API for building beautiful web apps (PoC)
import 'package:deepyr/deepyr.dart';
import 'package:jaspr/server.dart';
// Generated by Jaspr
import 'jaspr_options.dart';
void main() {
Jaspr.initializeApp(options: defaultJasprOptions);
runApp(
Document(
title: 'Deepyr Example',
head: <Component>[link(href: 'styles.css', rel: 'stylesheet')],
body: const Example(),
),
);
}
class Example extends StatelessComponent {
const Example({super.key});
@override
Component build(BuildContext context) {
return div([
Button([text('Neutral')], style: [Button.neutral]),
Button([text('Primary')], style: [Button.primary]),
Button([text('Secondary')], style: [Button.secondary]),
Button([text('Accent')], style: [Button.accent]),
Button([text('Info')], style: [Button.info]),
Button([text('Success')], style: [Button.success]),
Button([text('Warning')], style: [Button.warning]),
Button([text('Error')], style: [Button.error]),
]);
}
}