Skip to content

Commit

Permalink
higlight required form fields in material design
Browse files Browse the repository at this point in the history
  • Loading branch information
s-tittel committed Oct 8, 2024
1 parent dfa7648 commit a748a2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/themes/material.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ mdui-text-field::part(input) {
}
form.mode-edit { --label-width: 0em; }
.property-instance { margin-bottom:14px; }
.mode-edit .property-instance *[required]::part(icon) { align-self: flex-start; padding-top: 0.7em; }
.mode-edit .property-instance *[required]::part(icon)::before { color: red; content: '\2736'; font-size: 0.6em; }
1 change: 1 addition & 0 deletions src/themes/material.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export class MaterialTheme extends Theme {
editor.variant = 'outlined'
editor.label = label
editor.helper = template?.description?.value
editor.clearable = true
// @ts-ignore
const result = this.createDefaultTemplate('', null, required, editor, template)
let addEmptyOption = true
Expand Down

0 comments on commit a748a2d

Please sign in to comment.