/// <summary>
 /// Used to add inherited components classes
 /// </summary>
 internal protected virtual void ConstractClasses()
 {
     CssClasses = new List <string>();
     this.AddHiddenClass();
     if (InputAttributes.ContainsKey("class"))
     {
         CssClasses.Add(InputAttributes["class"].ToString());
     }
 }
Пример #2
0
        private string GetAttribute(string key)
        {
            if (InputAttributes.ContainsKey(key))
            {
                return(InputAttributes[key].ToString());
            }

            return(null);
        }
        private void BuildComponent()
        {
            ConfigureComponent();
            if (InputAttributes != null && InputAttributes.ContainsKey("Class"))
            {
                ElementClass = $"{ElementClass} {InputAttributes["Class"]}";
                InputAttributes.Remove("Class");
            }

            if (AsComponent != null && !ElementAttributes.ContainsKey(nameof(ChildContent)))
            {
                ElementAttributes.Add(nameof(ChildContent), ChildContent);
            }

            ElementAttributes["Class"] = ElementClass;
        }