Skip to content

Commit

Permalink
refactor(Outlines): rename config properties, add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seangwright committed May 6, 2023
1 parent 9dd560c commit 296a0c4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,41 @@ namespace XperienceCommunity.PreviewComponentOutlines
{
public class OutlinesConfiguration
{
/// <summary>
/// Color of the outline surrounding Page Builder components
/// </summary>
/// <value></value>
public string OutlineColor { get; set; } = "#ccc";
public string FontSize { get; set; } = "1rem";
public string FontColor { get; set; } = "#7f09b7";
public string BackgroundColor { get; set; } = "#fff";
/// <summary>
/// Font size of the label text for each Page Builder component
/// </summary>
/// <value></value>
public string LabelFontSize { get; set; } = "1rem";
/// <summary>
/// Font color of the label text for each Page Builder component
/// </summary>
/// <value></value>
public string LabelFontColor { get; set; } = "#7f09b7";
/// <summary>
/// Background color of the label for each Page Builder component
/// </summary>
/// <value></value>
public string LabelBackgroundColor { get; set; } = "#fff";
/// <summary>
/// Border color of the label for each Page Builder component
/// </summary>
/// <value></value>
public string LabelBorderColor { get; set; } = "#7f09b7";
public string Padding { get; set; } = ".5rem";
public string Opacity { get; set; } = ".8";
/// <summary>
/// Padding of the label for each Page Builder component
/// </summary>
/// <value></value>
public string LabelPadding { get; set; } = ".5rem";
/// <summary>
/// Opacity of the label for each Page Builder Component
/// </summary>
/// <value></value>
public string LabelOpacity { get; set; } = ".8";
/// <summary>
/// If true, the styles provided by the library will be used for Page Builder component
/// outlines and labels along with any customized values in this configuration class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ private string Style
position: absolute;
white-space: pre;
content: attr(data-xpc-preview-outline);
padding: {{config.Padding}};
color: {{config.FontColor}};
background-color: {{config.BackgroundColor}};
padding: {{config.LabelPadding}};
color: {{config.LabelFontColor}};
background-color: {{config.LabelBackgroundColor}};
border: 1px solid {{config.LabelBorderColor}};
border-radius: 5000px;
font-size: {{config.FontSize}};
font-size: {{config.LabelFontSize}};
z-index: 1;
opacity: {{config.Opacity}};
opacity: {{config.LabelOpacity}};
isolation: isolate;
}

Expand Down

0 comments on commit 296a0c4

Please sign in to comment.