Skip to content

Typography cleanup#299

Merged
pixelbandito merged 2 commits intomasterfrom
typography-cleanup
Feb 22, 2021
Merged

Typography cleanup#299
pixelbandito merged 2 commits intomasterfrom
typography-cleanup

Conversation

@pixelbandito
Copy link
Copy Markdown
Contributor

No description provided.

Added "inherit" as an option for color, size, and weight, for use cases
where the Typography component is partially overwriting styles in an
already-styled block.

Prefixed CSS module classnames with the "dimension", i.e. "inherit" ->
"size--inherit".

Removed "align" prop, since the component doesn't add anything to that
use case (it just passed through the prop as a CSS `text-align` value).

Updated some TS types in anticipation of added color, size, tag, and
weight knobs to storybook.
...for color, size, tag, and weight props.
@pixelbandito
Copy link
Copy Markdown
Contributor Author

While verifying that Typography wasn't being exported in the most recent release, I noticed that it was also missing instrumentation for its props in Storybook.

That led down a short rabbit hole and some additional cleanup.

@pixelbandito
Copy link
Copy Markdown
Contributor Author

fyi: Typography hasn't been released yet. The code is on master, waiting for a new release and version bump.

@pixelbandito pixelbandito merged commit 764eed3 into master Feb 22, 2021
@pixelbandito pixelbandito deleted the typography-cleanup branch February 22, 2021 19:24
color = 'primary',
className: passedClassName = '',
size = 'md',
size = 'medium',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious... Why is this defaulted medium instead of md? The style class is defined as .size--md and the size type doesn't have a medium option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't mean to do that! Thank you for catching it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants