Skip to content

Text component requires me to duplicate parent component styles instead of cascading #8516

@alex-page

Description

@alex-page

Issue summary

When trying to right align typography inside an IndexTable heading I have to provide the following properties:

  • variant
  • color
  • fontWeight
  • as
  • alignment

Expected behavior

I should only have to provide alignment as I want to follow the parents cascading styles that set fontWeight color and fontSize and for the element to default to a span or p.

Actual behavior

See this PR: #8448

Repeat a lot of code and output more CSS then is needed because I am forced to use properties in the component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions