Skip to content
This repository was archived by the owner on Sep 21, 2026. It is now read-only.

add title and description props and slots for Modal - #498

Merged
ArmanNik merged 5 commits into
1.4.xfrom
refactor/modal-header
Aug 22, 2023
Merged

ArmanNik merged 5 commits into
1.4.xfrom
refactor/modal-header

Conversation

@TGlide

@TGlide TGlide commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

What does this PR do?

Refactors Modal to allow title and description in header, just like in Pink.

I also opted to allow a prop instead of a slot, while keeping the slot as an option. The prop is autocompletable, unlike the slot, and is much simpler to write than <svelte:fragment slot="title>. The slot should remain though IMo in cases where you want to add HTML elements rather than just text.

This refactors most Modals to use the prop syntax.

Test Plan

Manual

Related PRs and Issues

Based on #479

Have you read the Contributing Guidelines on issues?

Yes

@TGlide TGlide added the enhancement New feature or request label Aug 9, 2023
@TGlide
TGlide requested a review from ArmanNik August 9, 2023 18:05
@TGlide TGlide self-assigned this Aug 9, 2023
@vercel

vercel Bot commented Aug 9, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
console ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 5:05pm
console-cloud ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 5:05pm
console-next ❌ Failed (Inspect) Aug 22, 2023 5:05pm
console-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 5:05pm

@ArmanNik
ArmanNik changed the base branch from command-center-and-migrations to 1.4.x August 22, 2023 16:12

@ArmanNik ArmanNik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to refactor all remaining modals introduced after this PR 😅

This branch was successfully deployed

3 active deployments
Preview – console-preview — cf5078aa Deployed Aug 22, 2023 by vercel[bot]
Preview – console-cloud — cf5078aa Deployed Aug 22, 2023 by vercel[bot]
Preview – console — cf5078aa Deployed Aug 22, 2023 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants