import "package:flutter/material.dart";
class BookTile extends StatelessWidget {
final VoidCallback onTap;
const BookTile({super.key, required this.label, required this.isSelected, required this.onTap});
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
final isDark = Theme.of(context).brightness == Brightness.dark;
final tileColor = isDark ? colorScheme.surfaceContainerHigh : colorScheme.surface;
final borderColor = isDark ? colorScheme.outlineVariant : colorScheme.scrim;
elevation: isDark ? 2 : 4,
color: isSelected ? colorScheme.primaryContainer : tileColor,
shadowColor: colorScheme.shadow,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
color: isSelected ? colorScheme.primary : borderColor,
width: isSelected ? 2 : 1,
borderRadius: BorderRadius.circular(12),
textAlign: TextAlign.center,
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w600,
color: isSelected ? colorScheme.onPrimaryContainer : colorScheme.onSurface,