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

feat: Allow native div props on InlineNotification #5070

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/silver-cougars-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": minor
---

Allow native div props on InlineNotification
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react"
import React, { HTMLAttributes } from "react"
import classnames from "classnames"
import { HeadingProps } from "~components/Heading"
import { OverrideClassName } from "~components/types/OverrideClassName"
Expand All @@ -9,7 +9,7 @@ import {
} from "../subcomponents/GenericNotification"
import styles from "../subcomponents/GenericNotification/GenericNotification.module.scss"

export type InlineNotificationBase = OverrideClassName<{
export type InlineNotificationBase = {
children?: React.ReactNode
/** @default false */
persistent?: boolean
Expand All @@ -20,7 +20,8 @@ export type InlineNotificationBase = OverrideClassName<{
forceMultiline?: boolean
headingProps?: HeadingProps
isSubtle?: boolean
}>
} & Omit<OverrideClassName<HTMLAttributes<HTMLDivElement>>, "style">
// Omitted `style` above because GenericNotification has its own `style` prop

export type InlineNotificationProps = InlineNotificationBase &
(GenericNotificationType | GenericNotificationVariant)
Expand Down