mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 12:07:44 +08:00
ab3e3c0844
* feat(module: typography): support editable * fix tests
34 lines
782 B
C#
34 lines
782 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign
|
|
{
|
|
public class Title : TypographyBase
|
|
{
|
|
protected override string HtmlType => "h" + Level;
|
|
|
|
private const int DefaultLevel = 1;
|
|
|
|
private int _level = DefaultLevel;
|
|
|
|
[Parameter]
|
|
public int Level
|
|
{
|
|
get
|
|
{
|
|
return _level;
|
|
}
|
|
set
|
|
{
|
|
_level = value < 1 || value > 4
|
|
? DefaultLevel
|
|
: value;
|
|
}
|
|
}
|
|
}
|
|
}
|