Skip to content

Commit

Permalink
Add Nunjucks parameter documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
querkmachine authored and romaricpascal committed Jan 9, 2025
1 parent 1d09d76 commit ea87121
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ export class FileUpload extends GOVUKFrontendComponent {
selectFilesButton: 'Choose file',
filesSelectedDefault: 'No file chosen',
filesSelected: {
// the 'one' string isn't used as the component displays the filename
// instead, however it's here for coverage's sake
one: '%{count} file chosen',
other: '%{count} files chosen'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ params:
type: string
required: true
description: HTML to add after the input. If `html` is provided, the `text` option will be ignored.
- name: selectFilesButtonText
type: string
required: false
description: The text of the button that opens the file picker. JavaScript enhanced version of the component only. Default is "Choose file".
- name: filesSelected
type: object
required: false
description: The text to display when multiple files has been chosen by the user. JavaScript enhanced version of the component only. The component will replace the `%{count}` placeholder with the number of files selected. This is a [pluralised list of messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).
- name: filesSelectedDefault
type: string
required: false
description: The text to display when no file has been chosen by the user. JavaScript enhanced version of the component only. Default is "No file chosen".
- name: classes
type: string
required: false
Expand Down

0 comments on commit ea87121

Please sign in to comment.