ProjectCardWidget
This commit is contained in:
parent
c114fcf28b
commit
46f94d4f88
@ -15,6 +15,7 @@ class StorybookApp extends StatelessWidget {
|
|||||||
BaseCardWidget.story,
|
BaseCardWidget.story,
|
||||||
PrimaryCardWidget.story,
|
PrimaryCardWidget.story,
|
||||||
CartCardWidget.story,
|
CartCardWidget.story,
|
||||||
|
ProjectCardWidget.story,
|
||||||
TabbarWidget.story,
|
TabbarWidget.story,
|
||||||
InputWidget.story,
|
InputWidget.story,
|
||||||
ChipsButtonWidget.story,
|
ChipsButtonWidget.story,
|
||||||
|
@ -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);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user