carbon icon indicating copy to clipboard operation
carbon copied to clipboard

ListItem to inherit font styles from List

Open johnb-sage opened this issue 2 years ago • 2 comments

Desired behaviour

ListItem inherits font styles from List. To apply a font variant to all list items, the variant prop may be set on List alone.

<List variant="big">
	<ListItem>item 1</ListItem>
	<ListItem>item 2</ListItem>
	<ListItem>item 3</ListItem>
</List>

Current behaviour

Currently, ListItem does not inherit font styles from List. To apply a font variant to all list items, each list item must have the variant set.

<List>
	<ListItem variant="big">item 1</ListItem>
	<ListItem variant="big">item 2</ListItem>
	<ListItem variant="big">item 3</ListItem>
</List>

Suggested Solution

No response

CodeSandbox or Storybook URL

https://codesandbox.io/s/list-9tee68

Anything else we should know?

No response

Confidentiality

  • [X] I confirm there is no confidential or commercially sensitive information included.

johnb-sage avatar Aug 24 '22 13:08 johnb-sage

FE-5336

Parsium avatar Aug 30 '22 12:08 Parsium

This issue has been automatically marked as stale because it has not had recent activity. If you believe this issue is still valid and required please comment below. It will be reviewed by the core Carbon team and may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 17 '23 09:09 stale[bot]