[Notification] Fix error "Text strings must be rendered within a <Text> component" when title text is empty (#2247)
* Use ternary operator * Change files
This commit is contained in:
Родитель
f5aafd7cef
Коммит
5ecc998996
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "Fix error when title string is empty",
|
||||
"packageName": "@fluentui-react-native/notification",
|
||||
"email": "78454019+lyzhan7@users.noreply.github.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -79,7 +79,7 @@ export const Notification = compose<NotificationType>({
|
|||
<Slots.root {...mergedProps}>
|
||||
{icon && <Slots.icon {...iconProps} accessible={false} />}
|
||||
<Slots.contentContainer accessible={true}>
|
||||
{title && <Slots.title>{title}</Slots.title>}
|
||||
{title ? <Slots.title>{title}</Slots.title> : null}
|
||||
<Slots.message style={messageStyle}>{children}</Slots.message>
|
||||
</Slots.contentContainer>
|
||||
{onActionPress && <Slots.action {...notificationButtonProps} />}
|
||||
|
|
Загрузка…
Ссылка в новой задаче