You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseBootStrapComponent.cs 812 B

12345678910111213141516171819202122232425262728293031323334353637
  1. 
  2. using Microsoft.AspNetCore.Components;
  3. namespace BootStrapComponents
  4. {
  5. public class BaseBootStrapComponent: ComponentBase
  6. {
  7. [Parameter]
  8. public TextAlignment TextAlignment { get; set; } = TextAlignment.None;
  9. [Parameter]
  10. public RenderFragment ChildContent { set; get; }
  11. public IEnumerable<string> AutoClass()
  12. {
  13. if (TextAlignment != TextAlignment.None) yield return "text-" + TextAlignment.ToString();
  14. yield return "";
  15. }
  16. [Parameter]
  17. public string AdditionalClass { set; get; }
  18. }
  19. public enum TextAlignment
  20. {
  21. None,
  22. left,
  23. center,
  24. right,
  25. justify
  26. }
  27. public enum BackColor
  28. {
  29. primary,
  30. info,
  31. danger,
  32. white,
  33. }
  34. }