Web Componentsأساسي

Création d'un badge dynamique stylisé

السيناريو

Contexte : Une application affiche des statuts utilisateurs (actif, inactif, en attente). Le Problème : Les badges sont codés manuellement avec duplication de style. Contraintes : Utiliser un Web Component avec Shadow DOM pour encapsuler le style. Livrable attendu : Développer un composant <status-badge> acceptant un attribut status et adaptant son style en conséquence.

المهارات المستهدفة

webcomponentsshadowdomcomponentui

حالات تطبيقية أخرى في ⁨Web Components⁩

عرض كل الحالات التطبيقية في ⁨Web Components⁩

أسئلة أصلية من تصميم CodeDuel. لا ترتبط CodeDuel بأي ناشر أو هيئة اعتماد مذكورة؛ أسماء الشهادات والعلامات التجارية مملوكة لأصحابها، ولا تُذكر إلا للإشارة إلى المجال الذي يغطيه الاختبار. الإبلاغ عن محتوى