Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Nov 6, 2023
1 parent 43815f6 commit 171a30c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions styles/styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import (
"strings"
)

// Props is a map of CSS properties
type Props map[string]string

// ToInline converts the Props to an inline style string
func (p Props) ToInline() string {
// Extract the keys and sort them for deterministic order
keys := make([]string, 0, len(p))
Expand All @@ -32,6 +34,7 @@ func (p Props) ToInline() string {
return styleStr
}

// CSSNode is a Node that renders to a CSS string
type CSSNode string

// RenderTo satisfies part of the Node interface by allowing CSSNode to be written to a strings.Builder
Expand Down

0 comments on commit 171a30c

Please sign in to comment.