Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Component: Process list #979

Closed
brandonlenz opened this issue Mar 1, 2021 · 0 comments · Fixed by #1107
Closed

New Component: Process list #979

brandonlenz opened this issue Mar 1, 2021 · 0 comments · Fixed by #1107
Assignees
Labels
type: feature New feature or request
Milestone

Comments

@brandonlenz
Copy link
Contributor

brandonlenz commented Mar 1, 2021

Process List

USWDS Version

2.10.0

Description

A process list displays the steps or stages of important instructions or processes.

Requirements (proposed)

Prop Interface

interface ProcessListProps = {
  className?: string
  children: React.ReactElement<ProcessListItemProps>[]
  listProps: JSX.IntrinsicElements['ol']
}
interface ProcessListItemProps = {
  heading: string
  className?: string
  headerClassName?: string
  liProps: JSX.IntrinsicElements['li']
}

Example Implementation (proposed)

return (
  <ProcessList>
    <ProcessListItem heading="Start a process">
      {/*Any JSX or custom elements here*/}
    </ProcessListItem>
    <ProcessListItem heading="Proceed to the second step">
      {/*Any JSX or custom elements here*/}
    </ProcessListItem>
    <ProcessListItem heading="Complete the step-by-step process">
      {/*Any JSX or custom elements here*/}
    </ProcessListItem>
  </ProcessList>
)

Other Considerations

  • The uswds implementation makes recommendations for styling using theme settings. Will likely require making a judgement call on how to expose those through the react-uswds interface, or to leave themeing up to the implementer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants