Skip to content

Commit

Permalink
Style(web-twig): Unify usage of space between compound braces of props
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Nov 30, 2023
1 parent 5562ddc commit 40b99a0
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- Render with all props -->
<DocsSection
hasStack={false}
hasStack={ false }
stackAlignment="stretch"
tag="My tag"
title="My Title"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Button color="primary" isLoading>Loading button</Button>

<Button color="primary" isLoading isDisabled={false}>Loading button should still be disabled even if isDisabled is false</Button>
<Button color="primary" isLoading isDisabled={ false }>Loading button should still be disabled even if isDisabled is false</Button>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<Button color="primary" isDisabled={false}>Not Disabled button</Button>
<Button color="primary" isDisabled={ false }>Not Disabled button</Button>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<Button color="primary" isDisabled={false}>Not Disabled button with boolean false prop value</Button>
<Button color="primary" isDisabled={ false }>Not Disabled button with boolean false prop value</Button>
<Button color="primary" isDisabled="false">Disabled button with string false prop value, should still be disabled</Button>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set onClickCallback = "alert('\" test')" %}

<Button id="testId" name="testName" data-main="main" aria-label="label" not-valid-prop="unexist" color="primary" onclick={onClickCallback} formtarget="_blank">button</Button>
<Button id="testId" name="testName" data-main="main" aria-label="label" not-valid-prop="unexist" color="primary" onclick={ onClickCallback } formtarget="_blank">button</Button>

{% set onClickAppend = "document.body.append('<span>hello there</span>'); return false;" %}

<Button id="testId" name="testName" data-main="main" aria-label="label" not-valid-prop="unexist" color="primary" onclick={onClickAppend}>button</Button>
<Button id="testId" name="testName" data-main="main" aria-label="label" not-valid-prop="unexist" color="primary" onclick={ onClickAppend }>button</Button>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ButtonLink href="#" color="primary" isLoading>Loading button link</ButtonLink>

<ButtonLink href="#" color="primary" isLoading isDisabled={false}>Loading button link should still be disabled even if isDisabled is false</ButtonLink>
<ButtonLink href="#" color="primary" isLoading isDisabled={ false }>Loading button link should still be disabled even if isDisabled is false</ButtonLink>
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
{{ _requiredAttr }}
/>
<div class="{{ _dropzoneClassName }}" data-spirit-element="dropZone">
<Icon name="{{ _iconName }}" isReusable={false} />
<Icon name="{{ _iconName }}" isReusable={ false } />
<label for="{{ _id }}" class="{{ _dropzoneLabelClassName }}">
<span {{ classProp([_linkClassName, _linkPrimaryClassName, _linkUnderlinedClassName]) }}>
{{- _pickAFileText -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ To increase the limit for example to 20 MB, add the `maxFileSize` attribute.
The attribute value should be given in bytes:

```twig
<FileUploaderInput maxFileSize={20000000} />
<FileUploaderInput maxFileSize={ 20000000 } />
```

### Maximum Number of Files in Queue (JavaScript)
Expand All @@ -120,7 +120,7 @@ Limit of the maximum number of uploaded files. The default value is 10, but any
the `maxUploadedFiles` attribute:

```twig
<FileUploaderInput maxUploadedFiles={2} />
<FileUploaderInput maxUploadedFiles={ 2 } />
```

### Input Behavior When the Queue is Filled (JavaScript)
Expand All @@ -136,7 +136,7 @@ If you set the value of `queueLimitBehavior` to `disable`, the input will be dis
`hide`, the input disappears completely. After removing a file from the queue, the input is restored.

```twig
<FileUploaderInput maxUploadedFiles={2} queueLimitBehavior="hide" />
<FileUploaderInput maxUploadedFiles={ 2 } queueLimitBehavior="hide" />
```

### Allowed File Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
helperText="Max size of each file is 10 MB"
id="example-input-multiple-queue-control"
label="Label"
maxUploadedFiles={2}
maxUploadedFiles={ 2 }
multiple
name="example-input-multiple-queue-control"
pickAFileText="Upload your file(s)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
label="Label"
multiple
name="fileUploaderWithMetaData"
maxUploadedFiles={1}
maxUploadedFiles={ 1 }
queueLimitBehavior="disable"
/>
<FileUploaderList headingId="attachments-fileUploaderMetaData" id="FileUploaderListWithMetaData" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<!-- Render with all props -->
<HeaderDialogCloseButton
dialogId="my-menu"
enableDismiss={false}
enableDismiss={ false }
label="Close menu"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<ModalDialog
autocomplete="on"
elementType="form"
isExpandedOnMobile={false}
isExpandedOnMobile={ false }
maxHeightFromTabletUp="700px"
method="dialog"
preferredHeightOnMobile="400px"
Expand All @@ -51,7 +51,7 @@
>
<ModalHeader
closeLabel="Close form"
enableDismiss={false}
enableDismiss={ false }
modalId="modal-example-2"
titleId="modal-example-2-title"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<Modal id="example_custom_height" titleId="example_custom_height_title">
<ModalDialog
elementType="form"
isExpandedOnMobile={false}
isExpandedOnMobile={ false }
maxHeightFromTabletUp="700px"
method="dialog"
preferredHeightOnMobile="400px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{% set title = 'Size ' ~ size %}
<DocsSection title={{ title }}>
{% for color in colors %}
<Tag color={color} size={size} isSubtle>Tag {{ color }}</Tag>
<Tag color={color} size={size}>Tag {{ color }}</Tag>
<Tag color={ color } size={ size } isSubtle>Tag {{ color }}</Tag>
<Tag color={ color } size={ size }>Tag {{ color }}</Tag>
{% endfor %}
</DocsSection>
{% endfor %}
Expand Down

0 comments on commit 40b99a0

Please sign in to comment.