Skip to content

Commit

Permalink
take out () on ternary (#98)
Browse files Browse the repository at this point in the history
as they are not required, like when using the if () syntax
  • Loading branch information
Mariusthvdb authored Jul 31, 2023
1 parent 1c6c2dd commit 949bb5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ Alternatively, you can use the ternary notation, which makes for neat and short
- templates
templates:
icon: >
return (state === 'on') ? 'mdi:test-tube' : 'mdi:test-tube-off';
return state === 'on' ? 'mdi:test-tube' : 'mdi:test-tube-off';
<<: &state_color
icon_color: >
return (state === 'on') ? 'var(--primary-color)' : 'grey';
return state === 'on' ? 'var(--primary-color)' : 'grey';
```

0 comments on commit 949bb5a

Please sign in to comment.