orbit icon indicating copy to clipboard operation
orbit copied to clipboard

align attribute not working in Heading component

Open statsgod opened this issue 11 months ago • 0 comments

For the heading component, text seems to be defaulting to align="center" with no way to override it using any of the options here: https://orbit.kiwi/components/text/heading/react/#enum

Expected Behavior

setting align="start" should be the equivalent of a left text-align

Current Behavior

setting align="start" does not change text-align (defaults to center)

Possible Solution

Not sure, but did see some docs using "left" whereas some say "start", neither work for me but wondering if this changed at some point and broke in certain places

Steps to Reproduce

<Tile expandable header={<Heading type="title1" align="start" largeMobile={{ align: "start" }}> Testing </Heading>} icon={<Icons.Accommodation />}

example based on this line: https://github.com/kiwicom/orbit/blob/a7267c418d343bf8849e56fe6da4f61e8e2bc625/packages/orbit-components/src/Dialog/index.tsx#L179

Context (Environment)

This is causing inconsistencies between where I use a title or a header in my tiles (title being less flexible for changes and header={<Heading...} not working predictably.

statsgod avatar Aug 06 '23 14:08 statsgod