-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Labels
design systemUpdates or issues to align components to the Red Hat Design System.Updates or issues to align components to the Red Hat Design System.functionalityFunctionality, typically pertaining to the JavaScript.Functionality, typically pertaining to the JavaScript.new component requestpriority: lowSeverity level: 3Severity level: 3
Milestone
Description
Component name:
- pfe-readtime
This component includes a JavaScript function that calculates the number of words inside the wrapper tag, and based on the average amount of words read per minute of 250, it divides the number of words by 250 and applies a floor function to approximate the number of minutes it would take to read.
Example, an article containing 2803 words divided by 250 is 11.212, and then rounding down using the floor function it should estimate 11 minutes.
Implementation Details
- default slot should contain "minute read" which could be translated via google translate
- If page builder passes in a custom string, it will be used instead
<pfe-readtime>minute read</pfe-readtime>
<pfe-readtime-wrapper> {{ contents of the article }} </pfe-readtime-wrapper>should generate:
^ probably without the hyphen though?
Design specification
This component can use this mixin to call typography styles:
@include pfe-typography(md, $type: "text", $use-local);Accessibility
- not sure that there are any accessibility requirements here? As long as a screen reader can read the text, we should be good
Interaction
No interaction.
Analytics
No Analytics.
Metadata
Metadata
Assignees
Labels
design systemUpdates or issues to align components to the Red Hat Design System.Updates or issues to align components to the Red Hat Design System.functionalityFunctionality, typically pertaining to the JavaScript.Functionality, typically pertaining to the JavaScript.new component requestpriority: lowSeverity level: 3Severity level: 3

