mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-24 12:06:34 +00:00
29 lines
902 B
Plaintext
29 lines
902 B
Plaintext
<div class="option-display-box">
|
|
<div class="option-content">
|
|
<div class="option-title">@this.Name</div>
|
|
<div class="option-description">@this.Description</div>
|
|
</div>
|
|
<div class="option-control">
|
|
<FluentTextField @bind-Value="this.Value"
|
|
@onchange="this.OnValueChanged"
|
|
Placeholder="Enter text" />
|
|
</div>
|
|
</div>
|
|
|
|
@inherits OptionBase<string>
|
|
@code {
|
|
protected override string ConvertValue(OptionInstance optionInstance, OptionProperty property)
|
|
{
|
|
var value = property.Getter(optionInstance) as string;
|
|
return value ?? string.Empty;
|
|
}
|
|
|
|
private void OnValueChanged(ChangeEventArgs e)
|
|
{
|
|
var newValue = e.Value?.ToString() ?? string.Empty;
|
|
this.Value = newValue;
|
|
this.Property.Setter(this.Instance, newValue);
|
|
this.NotifyValueChanged();
|
|
}
|
|
}
|