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

fix(ffe-system-message-react): SystemMessageProps now extends React.C… #1930

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

SaraElisabethIdris
Copy link
Contributor

…omponentProps<'div'>

La til extends React.ComponentProps<'div'> for at man skal kunne ha JSX elementer inni.

Testing

Testet lokalt

@SaraElisabethIdris SaraElisabethIdris requested a review from a team as a code owner April 23, 2024 14:56
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-1930.westeurope.2.azurestaticapps.net

@@ -1,6 +1,6 @@
import * as React from 'react';

export interface SystemMessageProps {
Copy link
Contributor

@pethel pethel Apr 24, 2024

Choose a reason for hiding this comment

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

usen takk for ditt bidrag.
Da kan man fjerne className og children, iaf som er en del av React.ComponentProps<'div'>

Ser også ut som vi ikke har en ref. Så det blir vell mest riktigt her att bruke ComponentPropsWithoutRef. tenker hele kan vare slik. enig?

export interface SystemMessageProps extends React.ComponentPropsWithoutRef<'div'>  {
    animationLengthMs?: number;
    icon?: React.ReactNode;
    locale?: 'en' | 'nb' | 'nn';
    onClose?: React.MouseEventHandler<HTMLButtonElement>;
    onColoredBg?: boolean;
}

@SaraElisabethIdris SaraElisabethIdris force-pushed the develop_fix-system-message-props branch from 957ac59 to c25746f Compare April 24, 2024 08:29
@SaraElisabethIdris SaraElisabethIdris merged commit 90058c7 into develop Apr 24, 2024
2 checks passed
@SaraElisabethIdris SaraElisabethIdris deleted the develop_fix-system-message-props branch April 24, 2024 08:30
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-1930.westeurope.2.azurestaticapps.net

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

Successfully merging this pull request may close these issues.

2 participants