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

Updates default MarketingModal closeIconColor prop #2176

Merged
merged 4 commits into from
Jan 19, 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/strange-pumpkins-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/marketing-modal': patch
---

Sets the default `closeIconColor` to correctly be 'default' (`CloseIconColor.Default`)
5 changes: 5 additions & 0 deletions .changeset/tricky-games-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/modal': patch
---

Sets the `CloseIconColor` enum to be readonly (`as const`). Improves TypeScript Intellisense/autocomplete
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const MarketingModal = ({
linkText,
darkMode: darkModeProp,
graphicStyle = GraphicStyle.Center,
closeIconColor = CloseIconColor.Dark,
closeIconColor = CloseIconColor.Default,
blobPosition = BlobPosition.TopLeft,
showBlob = false,
disclaimer,
Expand Down
2 changes: 1 addition & 1 deletion packages/modal/src/Modal/Modal.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const CloseIconColor = {
Default: 'default',
Dark: 'dark',
Light: 'light',
};
} as const;

export type CloseIconColor =
(typeof CloseIconColor)[keyof typeof CloseIconColor];
Expand Down
Loading