microsoft / fluentui-react-native

A react-native component library that implements the Fluent Design System.

Home Page:https://developer.microsoft.com/fluentui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Win32][Button] There's an extra space for Buttons with icon

ValentinaKozlova opened this issue · comments

Steps:

  1. Create Button with icons from the left and right sides.
  2. Open Experimental Button page in Tester.

Actual result:
If icon is from the left side, extra space will be from the right. And the same thing for right icons.
It's because of this code in Button.styling.ts

const spacingIconContent = tokens.spacingIconContent
    ? {
        marginLeft: tokens.spacingIconContent,
        marginRight: tokens.spacingIconContent,
      }
    : {};

image

Expected result:
There should be conditiion for position of icon. Currently both margins are added by default.