feat(frontend): add material catalogue screen with search and filters
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:google_fonts/google_fonts.dart";
|
||||
|
||||
/// Pastille de statut d'un matériel (disponible / emprunté).
|
||||
class StatusPill extends StatelessWidget {
|
||||
const StatusPill({super.key, required this.disponible});
|
||||
|
||||
final bool disponible;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final label = disponible ? "Disponible" : "Emprunté";
|
||||
final background = disponible ? const Color(0xFFDCFCE7) : const Color(0xFFFEF9C3);
|
||||
final foreground = disponible ? const Color(0xFF15803D) : const Color(0xFFA16207);
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
decoration: BoxDecoration(color: background, borderRadius: BorderRadius.circular(999)),
|
||||
child: Text(
|
||||
label,
|
||||
style: GoogleFonts.darkerGrotesque(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: foreground,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user