Skip to content

Commit

Permalink
Merge pull request #2 from grebaldi/feature/btn-success
Browse files Browse the repository at this point in the history
FEATURE: Add remaining button variants
  • Loading branch information
bwaidelich authored Jan 30, 2024
2 parents 1ac3deb + df4e0ee commit 3def4f0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Resources/Private/Fusion/Components/Button.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ prototype(NeosBE:Button) < prototype(Neos.Fusion:Component) {
# If set to `true` the button is highlighted as a dangerous button (usually with orange/red colors)
isDangerous = false

# If set to `true` the button is highlighted as a success button (usually with green color)
isSuccess = false

# If set to `true` the button is highlighted as a warning button (usually with yellow color)
isWarning = false

# If set, the button will link to the specified module (e.g. "administration/users"). This can be combined with `action`, `arguments` and `addQueryString`
module = ''
Expand All @@ -78,7 +83,13 @@ prototype(NeosBE:Button) < prototype(Neos.Fusion:Component) {
modal = ''

renderer.@context {
class = ${'neos-button' + (props.isPrimary ? ' neos-button-primary' : '') + (props.isDangerous ? ' neos-button-danger' : '')}
class = ${[
'neos-button',
props.isPrimary && 'neos-button-primary',
props.isDangerous && 'neos-button-danger',
props.isSuccess && 'neos-button-success',
props.isWarning && 'neos-button-warning'
]}
content = Neos.Fusion:Case {
withIcon {
condition = ${!String.isBlank(props.icon)}
Expand Down

0 comments on commit 3def4f0

Please sign in to comment.