Skip to content

Commit

Permalink
Merge pull request #910 from nhsuk/sarawilcox-patch-6
Browse files Browse the repository at this point in the history
Add headings and info re decimal numbers
  • Loading branch information
chrimesdev authored Jan 22, 2021
2 parents e59b342 + d12a12c commit 1e62233
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/design-system/components/text-input.njk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
type: "input-hint-text"
}) }}

<h3 id="asking-for-whole-numbers">Asking for whole numbers</h3>
<h3 id="asking-for-numbers">Asking for numbers</h3>
<h4 id="whole-numbers">Whole numbers</h4>
<p>If you’re asking the user to enter a whole number and you want to bring up the numeric keypad on a mobile device, set the <code>inputmode</code> attribute to <code>numeric</code> and the <code>pattern</code> attribute to <code>[0-9]*</code>. See how to do this in the HTML and Nunjucks tabs in the following example.</p>

{{ designExample({
Expand All @@ -77,6 +78,8 @@
<li><a href="https://design-system.service.gov.uk/patterns/dates/">dates</a></li>
<li><a href="https://design-system.service.gov.uk/patterns/telephone-numbers/">telephone numbers</a></li>
</ul>
<h4 id="decimal-numbers">Decimal numbers</h4>
<p>The GOV.UK Design System has guidance on <a href="https://design-system.service.gov.uk/components/text-input/#asking-for-decimal-numbers">asking for decimal numbers</a>.</p>

<h3 id="error-messages">Error messages</h3>
<p>Style error messages like this.</p>
Expand Down

0 comments on commit 1e62233

Please sign in to comment.