Skip to content

Commit 17af130

Browse files
amgleitmanAdam Gleitman
andauthored
Fix notification button padding (#2448)
* Remove notification button padding * Change files * Use size tokens * Update snapshots Co-authored-by: Adam Gleitman <[email protected]>
1 parent 5ff648e commit 17af130

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix notification button padding",
4+
"packageName": "@fluentui-react-native/notification",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/components/Notification/src/Notification.helper.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Svg, { G, Path, SvgProps } from 'react-native-svg';
33
import { ButtonProps, ButtonTokens, ButtonV1 as Button } from '@fluentui-react-native/button';
44
import { mergeProps, stagedComponent } from '@fluentui-react-native/framework';
55
import { SvgIconProps, createIconProps } from '@fluentui-react-native/icon';
6+
import { globalTokens } from '@fluentui-react-native/theme-tokens';
67
import { NotificationProps } from './Notification.types';
78

89
export type NotificationButtonColorStates = { disabledColor; pressedColor };
@@ -70,6 +71,13 @@ export const NotificationButton = stagedComponent((props: NotificationButtonProp
7071
color: props.pressedColor,
7172
},
7273
},
74+
medium: {
75+
hasContent: {
76+
minWidth: 0,
77+
padding: globalTokens.sizeNone,
78+
paddingHorizontal: globalTokens.sizeNone,
79+
},
80+
},
7381
});
7482

7583
return (final: NotificationButtonProps, children: React.ReactNode) => {

packages/components/Notification/src/__tests__/__snapshots__/Notification.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ exports[`Notification component tests Notification default 1`] = `
196196
"flexDirection": "row",
197197
"justifyContent": "center",
198198
"marginStart": 16,
199-
"minWidth": 96,
200-
"padding": 8,
201-
"paddingHorizontal": 15,
199+
"minWidth": 0,
200+
"padding": 0,
201+
"paddingHorizontal": 0,
202202
}
203203
}
204204
>

0 commit comments

Comments
 (0)