-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1994 from x-govuk/task-list-component
Task list component guidance and updated pattern page
- Loading branch information
Showing
20 changed files
with
815 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
title: Task list with all colours | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/task-list/macro.njk" import govukTaskList %} | ||
|
||
{{ govukTaskList({ | ||
idPrefix: "all-colours", | ||
items: [ | ||
{ | ||
title: { | ||
text: "Task A" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Grey", | ||
classes: "govuk-tag--grey" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task B" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Green", | ||
classes: "govuk-tag--green" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task C" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Turquoise", | ||
classes: "govuk-tag--turquoise" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task D" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Blue", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task E" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Light blue", | ||
classes: "govuk-tag--light-blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task F" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Purple", | ||
classes: "govuk-tag--purple" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task G" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Pink", | ||
classes: "govuk-tag--pink" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task H" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Orange", | ||
classes: "govuk-tag--orange" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Task I" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Yellow", | ||
classes: "govuk-tag--yellow" | ||
} | ||
} | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Task list with cannot start yet | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/task-list/macro.njk" import govukTaskList %} | ||
|
||
{{ govukTaskList({ | ||
idPrefix: "application-details", | ||
items: [ | ||
{ | ||
title: { | ||
text: "Company details" | ||
}, | ||
href: "#", | ||
status: { | ||
text: "Completed" | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Project details" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Fund applied to" | ||
}, | ||
hint: { | ||
text: "The funds will be announced on 1 April 2022" | ||
}, | ||
status: { | ||
text: "Cannot start yet", | ||
classes: "govuk-task-list__status--cannot-start-yet" | ||
} | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: Task list | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/task-list/macro.njk" import govukTaskList %} | ||
|
||
{{ govukTaskList({ | ||
idPrefix: "company-details", | ||
items: [ | ||
{ | ||
title: { | ||
text: "Company Directors" | ||
}, | ||
href: "#", | ||
status: { | ||
text: "Completed" | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Registered company details" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Financial history" | ||
}, | ||
hint: { | ||
text: "Include 5 years of the company’s relevant financial information." | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Business plan" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "References" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
} | ||
] | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: Task list with an error | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/task-list/macro.njk" import govukTaskList %} | ||
|
||
{{ govukTaskList({ | ||
idPrefix: "application-details", | ||
items: [ | ||
{ | ||
title: { | ||
text: "Contact details" | ||
}, | ||
href: "#", | ||
status: { | ||
text: "Completed" | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Project details" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "Incomplete", | ||
classes: "govuk-tag--blue" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Funding required" | ||
}, | ||
href: "#", | ||
status: { | ||
tag: { | ||
text: "There is a problem", | ||
classes: "govuk-tag--red" | ||
} | ||
} | ||
}, | ||
{ | ||
title: { | ||
text: "Bank account" | ||
}, | ||
href: "#", | ||
status: { | ||
text: "Completed" | ||
} | ||
} | ||
] | ||
}) }} |
Oops, something went wrong.