public IViewComponentResult Invoke(
            string text,
            string cssClass
            )
        {
            var model = new InsetTextViewModel(text, string.IsNullOrEmpty(cssClass) ? null : cssClass);

            return(View(model));
        }
 public static IHtmlContent GovUkInsetText(
     this IHtmlHelper htmlHelper,
     InsetTextViewModel insetTextViewModel)
 {
     return(htmlHelper.Partial("/GovUkDesignSystemComponents/InsetText.cshtml", insetTextViewModel));
 }
Example #3
0
 public static IHtmlContent GovUkInsetText(
     this IHtmlHelper htmlHelper,
     InsetTextViewModel insetTextViewModel)
 {
     return(htmlHelper.Partial("~/Partials/InsetText.cshtml", insetTextViewModel));
 }