Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOAPPFD0-168] Enable font scaling for the Button… components #94

Merged
merged 6 commits into from
Oct 4, 2023

Conversation

dmnplb
Copy link
Collaborator

@dmnplb dmnplb commented Oct 4, 2023

Short description

This PR enables font scaling for the Button... components only when the experimental DS is enabled.

List of changes proposed in this pull request

  • Enable font scaling for the ButtonSolid, ButtonOutline and ButtonLink components

Preview

How to test

  1. Launch the example app
  2. Go to the Buttons page
  3. Change dynamic type values with the Accessibility inspector

@dmnplb dmnplb added the a11y label Oct 4, 2023
@dmnplb dmnplb requested review from a team as code owners October 4, 2023 12:42
@@ -54,7 +54,7 @@ export const BaseTypography: React.FC<OwnProps> = props => {
: [props.fontStyle, fontStyle];

return (
<Text {...props} style={style}>
<Text allowFontScaling={false} {...props} style={style}>
Copy link
Contributor

Choose a reason for hiding this comment

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

what about wiring this to the experimental context too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that io-app has a default prop with allowFontScaling set to false. So it's kind of a redundant prop for proper testing in the example app.

@dmnplb dmnplb merged commit 8bfcee8 into main Oct 4, 2023
@dmnplb dmnplb deleted the IOAPPFD0-168-dynamic-type-buttons branch October 4, 2023 13:24
@CaraDune
Copy link

CaraDune commented Oct 4, 2023

what a time to be alive <3 thanks guys, let's keep up the good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants