Skip to content

Commit

Permalink
Update examples following new nested format
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Aug 16, 2023
1 parent 3e2731c commit 37abc6f
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 57 deletions.
83 changes: 72 additions & 11 deletions src/components/task-list/all-colours/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Blue",
classes: "govuk-task-list__status--blue"
tag: {
text: "Grey",
classes: "govuk-tag--grey"
}
}
},
{
Expand All @@ -25,8 +27,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Light blue",
classes: "govuk-task-list__status--light-blue"
tag: {
text: "Green",
classes: "govuk-tag--green"
}
}
},
{
Expand All @@ -36,8 +40,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Purple",
classes: "govuk-task-list__status--purple"
tag: {
text: "Turquoise",
classes: "govuk-tag--turquoise"
}
}
},
{
Expand All @@ -47,8 +53,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Pink",
classes: "govuk-task-list__status--pink"
tag: {
text: "Blue",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -58,11 +66,64 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Grey",
classes: "govuk-task-list__status--grey"
tag: {
text: "Light blue",
classes: "govuk-tag--light-blue"
}
}
},
{
title:
{
text: "Task name"
},
href: "#",
status: {
tag: {
text: "Purple",
classes: "govuk-tag--purple"
}
}
},
{
title:
{
text: "Task name"
},
href: "#",
status: {
tag: {
text: "Pink",
classes: "govuk-tag--pink"
}
}
},
{
title:
{
text: "Task name"
},
href: "#",
status: {
tag: {
text: "Orange",
classes: "govuk-tag--orange"
}
}
},
{
title:
{
text: "Task name"
},
href: "#",
status: {
tag: {
text: "Yellow",
classes: "govuk-tag--yellow"
}
}
}

]
})

Expand Down
11 changes: 6 additions & 5 deletions src/components/task-list/cannot-start-yet/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--text-colour"
text: "Completed"
}
},
{
Expand All @@ -25,8 +24,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -39,7 +40,7 @@ layout: layout-example.njk
},
status: {
text: "Cannot start yet",
classes: "govuk-task-list__status--secondary-text-colour"
classes: "govuk-hint"
}
}

Expand Down
27 changes: 17 additions & 10 deletions src/components/task-list/default/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--text-colour"
text: "Completed"
}
},
{
Expand All @@ -25,8 +24,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -39,8 +40,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -50,8 +53,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -61,8 +66,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
}

Expand Down
18 changes: 10 additions & 8 deletions src/components/task-list/error/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--text-colour"
text: "Completed"
}
},
{
Expand All @@ -25,8 +24,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Incomplete",
classes: "govuk-task-list__status--blue"
tag: {
text: "Incomplete",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -36,8 +37,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "There is a problem",
classes: "govuk-task-list__status--error"
tag: {
text: "There is a problem",
classes: "govuk-tag--red"
}
}
},
{
Expand All @@ -47,8 +50,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--text-colour"
text: "Completed"
}
}

Expand Down
21 changes: 13 additions & 8 deletions src/components/task-list/in-progress/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--text-colour"
text: "Completed"
}
},
{
Expand All @@ -25,8 +24,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "In progress",
classes: "govuk-task-list__status--light-blue"
tag: {
text: "In progress",
classes: "govuk-tag--light-blue"
}
}
},
{
Expand All @@ -36,8 +37,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not yet started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not yet started",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -47,8 +50,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not yet started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not yet started",
classes: "govuk-tag--blue"
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/task-list/index.md.njk
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ If you are creating your own statuses, use adjectives rather than verbs if you a

#### Additional statuses

If your user research shows that there is a need for additional status tags, you can use other colours to help distinguish between them. If you need more tag colours, you can use the suggested tints.
If your user research shows that there is a need for additional status tags, you can use other colours to help distinguish between them.

{{ example({group: "components", item: "task-list", example: "all-colours", html: true, nunjucks: true, open: false}) }}

Expand Down
33 changes: 19 additions & 14 deletions src/patterns/task-list-pages/default/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--black"
text: "Completed"
}
},
{
Expand All @@ -32,8 +31,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
}
]
Expand All @@ -50,8 +51,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--black"
text: "Completed"
}
},
{
Expand All @@ -61,8 +61,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -72,8 +74,7 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Completed",
classes: "govuk-task-list__status--black"
text: "Completed"
}
},
{
Expand All @@ -83,8 +84,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
},
{
Expand All @@ -94,8 +97,10 @@ layout: layout-example.njk
},
href: "#",
status: {
text: "Not started",
classes: "govuk-task-list__status--blue"
tag: {
text: "Not started",
classes: "govuk-tag--blue"
}
}
}
]
Expand Down

0 comments on commit 37abc6f

Please sign in to comment.