question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make clear ActionList.Item's `trailingIcon` can be a component

See original GitHub issue

The component props of ActionList.Item suggest that trailingIcon can be either an icon or similar.

  /**
   * Icon (or similar) positioned after `Item` text.
   */
  trailingIcon?: React.FunctionComponent<IconProps>

Would a Label be considered appropriate usage for this? If so, should we update props to allow more generic usage?

In addition to this, leadingVisual has the same definition but it’s name (“Visual”) suggest a more generic usage, I’m wondering if this differentiation in name is still appropriate.

  /**
   * Icon (or similar) positioned before `Item` text.
   */
  leadingVisual?: React.FunctionComponent<IconProps>

In effect, this is what I’m envisioning:

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
six7commented, Sep 21, 2021

We could adopt trailingVisual for the right-aligned component, making it obvious that side area can be used for more components than just icons. That’s also how we refer to it in the design docs, even though they are not exactly the same as leadingVisual in terms of behavior (one being always in a square container, the other supporting flexible widths).

👍 to trailingVisual for consistency with existing docs and other props. Also, we’re currently treating that prop with IconProps - I think we should update that as well to reflect a more generic usage?

0reactions
siddharthkpcommented, Oct 26, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create an Action Items List (Action Items Template)
If it's clear, concise and communicable, phrased in a way that allows you to complete the task in a small number of steps,...
Read more >
How to clear textfield value in Jetpack Compose?
You can use the trailingIcon attribute with a custom clickable modifier. Something like: var text by rememberSaveable { mutableStateOf("") } ...
Read more >
Composite components / ActionMenu / examples - Mixed Selection ...
In this list, there is a ActionList.Group with single selection for picking one option, followed by a Item that is an action. This...
Read more >
@primer/components | Yarn - Package Manager
- Revert first item focus fix for ActionList components. 28.2.2. Patch Changes. 68877076 #1275 Thanks @VanAnderson! - data props can be used in...
Read more >
A Quick Guide to Action Items & Action Item Lists
In order to make these abstract tasks more manageable, the project manager will break them into distinct action items. These are easier for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found