ProjectCardWidget

This commit is contained in:
PROF25-FINAL 2025-05-28 10:21:23 +03:00
parent c114fcf28b
commit 46f94d4f88
2 changed files with 67 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class StorybookApp extends StatelessWidget {
BaseCardWidget.story,
PrimaryCardWidget.story,
CartCardWidget.story,
ProjectCardWidget.story,
TabbarWidget.story,
InputWidget.story,
ChipsButtonWidget.story,

View File

@ -259,3 +259,69 @@ class CartCardWidget extends BaseCardWidget {
},
);
}
class ProjectCardWidget extends BaseCardWidget {
final String label;
ProjectCardWidget({super.key, required super.theme, required this.label})
: super(
width: 335.w,
height: null,
child: Padding(
padding: EdgeInsets.all(16.r),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 44.h,
children: [
Row(
children: [
Flexible(
child: Text(
label,
style: theme.styles.headlineMedium16.copyWith(
color: theme.palette.blackOld,
),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: EdgeInsets.only(bottom: 4.h),
child: Text(
"Прошло 2 дня",
style: theme.styles.captionSemibold14.copyWith(
color: theme.palette.placeholderOld,
),
),
),
SmallButtonWidget.filled(
theme: theme,
onTap: () {},
text: "Открыть",
),
],
),
],
),
),
);
static Story get story => Story(
name: "ProjectCard",
builder: (BuildContext context) {
var theme = CustomTheme.of(context);
String label = context.knobs.text(
label: "Label",
initial: "Мой первый проект",
);
return ProjectCardWidget(theme: theme, label: label);
},
);
}