Skip to content

Conversation

@KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented Oct 14, 2025

Description

Extracted from #4085

Component Checklist 📝

  • JSDoc
  • Examples
  • Documentation / Decision Records
  • Storybook
  • Style mappings (@navikt/core/css/config/_mappings.js)
  • Component tokens (@navikt/core/css/tokens.json)
  • CSS class deprecations (@navikt/aksel-stylelint/src/deprecations.ts)
  • Exports (@navikt/core/react/src/index.ts and @navikt/core/react/package.json)
  • New component? CSS import (@navikt/core/css/index.css)
  • Breaking change? Update migration guide. Consider codemod.
  • Changeset (Format: <Component>: <gitmoji?> <Text>. E.g. "Button: ✨ Add feature xyz.")

@KenAJoh KenAJoh requested a review from Copilot October 14, 2025 13:13
@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2025

🦋 Changeset detected

Latest commit: c6c099f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new GlobalAlert component as a replacement for <Alert fullWidth>, featuring built-in content centering and a compound component pattern with Header, Title, Content, and Close subcomponents.

  • Adds GlobalAlert as a new compound component with TypeScript types and comprehensive Storybook examples
  • Updates package exports and style mappings to include the new component
  • Creates a changeset documenting the minor version bump for both ds-react and ds-css packages

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
@navikt/core/react/src/index.ts Exports GlobalAlert component and all related types
@navikt/core/react/src/alert/global-alert/root/GlobalAlert.tsx Main component implementation with compound component pattern
@navikt/core/react/src/alert/global-alert/index.ts Barrel export file for GlobalAlert module
@navikt/core/react/src/alert/global-alert/title/GlobalAlertTitle.tsx Title subcomponent wrapper around BaseAlert.Title
@navikt/core/react/src/alert/global-alert/header/GlobalAlertHeader.tsx Header subcomponent wrapper around BaseAlert.Header
@navikt/core/react/src/alert/global-alert/content/GlobalAlertContent.tsx Content subcomponent wrapper around BaseAlert.Content
@navikt/core/react/src/alert/global-alert/close/GlobalAlertClose.tsx Close button subcomponent wrapper around BaseAlert.Close
@navikt/core/react/src/alert/global-alert/GlobalAlert.stories.tsx Comprehensive Storybook stories for all component variants
@navikt/core/react/package.json Adds package export path for GlobalAlert
@navikt/core/css/config/_mappings.js Adds style mapping configuration for GlobalAlert
.changeset/eighty-deer-brake.md Documents the new component addition

@KenAJoh KenAJoh merged commit 579ea49 into base-alert Oct 29, 2025
4 checks passed
@KenAJoh KenAJoh deleted the global-alert branch October 29, 2025 14:30
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.

3 participants