Skip to content

Commit

Permalink
feat: [MDS-618] Menu item component (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
GittHub-d committed Aug 2, 2023
1 parent 9f83994 commit 41ee0e1
Show file tree
Hide file tree
Showing 12 changed files with 889 additions and 30 deletions.
42 changes: 21 additions & 21 deletions example/lib/src/storybook/stories/accordion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AccordionStory extends Story {

final leadingColorsKnob = context.knobs.nullable.options(
label: "leadingColor",
description: "MoonColors variants for MoonAccordion leading.",
description: "MoonColors variants for MoonAccordion leading slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -39,7 +39,7 @@ class AccordionStory extends Story {

final expandedLeadingColorsKnob = context.knobs.nullable.options(
label: "expandedLeadingColor",
description: "MoonColors variants for expanded MoonAccordion leading.",
description: "MoonColors variants for expanded MoonAccordion leading slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -48,31 +48,31 @@ class AccordionStory extends Story {

final expandedLeadingColor = colorTable(context)[expandedLeadingColorsKnob ?? 40];

final labelColorsKnob = context.knobs.nullable.options(
label: "labelColor",
description: "MoonColors variants for MoonAccordion label.",
final titleColorsKnob = context.knobs.nullable.options(
label: "titleColor",
description: "MoonColors variants for MoonAccordion title slot.",
enabled: false,
initial: 0,
// piccolo
options: colorOptions,
);

final labelColor = colorTable(context)[labelColorsKnob ?? 40];
final titleColor = colorTable(context)[titleColorsKnob ?? 40];

final expandedLabelColorsKnob = context.knobs.nullable.options(
label: "expandedLabelColor",
description: "MoonColors variants for expanded MoonAccordion label.",
final expandedTitleColorsKnob = context.knobs.nullable.options(
label: "expandedTitleColor",
description: "MoonColors variants for expanded MoonAccordion title slot.",
enabled: false,
initial: 0,
// piccolo
options: colorOptions,
);

final expandedLabelColor = colorTable(context)[expandedLabelColorsKnob ?? 40];
final expandedTitleColor = colorTable(context)[expandedTitleColorsKnob ?? 40];

final trailingColorsKnob = context.knobs.nullable.options(
label: "trailingColor",
description: "MoonColors variants for MoonAccordion trailing.",
description: "MoonColors variants for MoonAccordion trailing slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -83,7 +83,7 @@ class AccordionStory extends Story {

final expandedTrailingColorsKnob = context.knobs.nullable.options(
label: "expandedTrailingColor",
description: "MoonColors variants for expanded MoonAccordion trailing.",
description: "MoonColors variants for expanded MoonAccordion trailing slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -94,7 +94,7 @@ class AccordionStory extends Story {

final contentTextColorsKnob = context.knobs.nullable.options(
label: "Content color",
description: "MoonColors variants for MoonAccordion content.",
description: "MoonColors variants for MoonAccordion content slot.",
enabled: false,
initial: 0,
// piccolo
Expand Down Expand Up @@ -186,8 +186,8 @@ class AccordionStory extends Story {
accordionSize: accordionSizesKnob,
leadingColor: leadingColor,
expandedLeadingColor: expandedLeadingColor,
titleColor: labelColor,
expandedTitleColor: expandedLabelColor,
titleColor: titleColor,
expandedTitleColor: expandedTitleColor,
trailingColor: trailingColor,
expandedTrailingColor: expandedTrailingColor,
borderColor: borderColor,
Expand Down Expand Up @@ -218,8 +218,8 @@ class AccordionStory extends Story {
accordionSize: accordionSizesKnob,
leadingColor: leadingColor,
expandedLeadingColor: expandedLeadingColor,
titleColor: labelColor,
expandedTitleColor: expandedLabelColor,
titleColor: titleColor,
expandedTitleColor: expandedTitleColor,
trailingColor: trailingColor,
expandedTrailingColor: expandedTrailingColor,
borderColor: borderColor,
Expand Down Expand Up @@ -251,8 +251,8 @@ class AccordionStory extends Story {
hasContentOutside: true,
leadingColor: leadingColor,
expandedLeadingColor: expandedLeadingColor,
titleColor: labelColor,
expandedTitleColor: expandedLabelColor,
titleColor: titleColor,
expandedTitleColor: expandedTitleColor,
trailingColor: trailingColor,
expandedTrailingColor: expandedTrailingColor,
borderColor: borderColor,
Expand All @@ -277,8 +277,8 @@ class AccordionStory extends Story {
hasContentOutside: true,
leadingColor: leadingColor,
expandedLeadingColor: expandedLeadingColor,
titleColor: labelColor,
expandedTitleColor: expandedLabelColor,
titleColor: titleColor,
expandedTitleColor: expandedTitleColor,
trailingColor: trailingColor,
expandedTrailingColor: expandedTrailingColor,
borderColor: borderColor,
Expand Down
8 changes: 4 additions & 4 deletions example/lib/src/storybook/stories/alert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AlertStory extends Story {
builder: (context) {
final leadingColorsKnob = context.knobs.nullable.options(
label: "Leading Color",
description: "MoonColors variants for MoonAlert leading.",
description: "MoonColors variants for MoonAlert leading slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -24,7 +24,7 @@ class AlertStory extends Story {

final titleColorsKnob = context.knobs.nullable.options(
label: "Title color",
description: "MoonColors variants for MoonAlert title.",
description: "MoonColors variants for MoonAlert title slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -35,7 +35,7 @@ class AlertStory extends Story {

final trailingColorsKnob = context.knobs.nullable.options(
label: "Trailing color",
description: "MoonColors variants for MoonAlert trailing.",
description: "MoonColors variants for MoonAlert trailing slot.",
enabled: false,
initial: 0,
// piccolo
Expand All @@ -46,7 +46,7 @@ class AlertStory extends Story {

final bodyColorsKnob = context.knobs.nullable.options(
label: "Body color",
description: "MoonColors variants for MoonAlert body.",
description: "MoonColors variants for MoonAlert body slot.",
enabled: false,
initial: 0,
// piccolo
Expand Down
Loading

0 comments on commit 41ee0e1

Please sign in to comment.