Skip to content

Commit

Permalink
Merge pull request #20 from mark-nicepants/master
Browse files Browse the repository at this point in the history
feat: pass padding to vue-qr
  • Loading branch information
Kristories committed Feb 27, 2023
2 parents 096d4a9 + cd2dce4 commit 8c0449e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/DetailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:size="field.detailSize"
:bgSrc="field.background"
:logoSrc="field.logo"
:margin="0"
:margin="field.margin"
></vue-qr>
</template>
</PanelItem>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/IndexField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:size="this.field.indexSize"
:bgSrc="this.field.background"
:logoSrc="this.field.logo"
:margin="0"
:margin="this.field.margin"
></vue-qr>
</span>
</template>
Expand Down
6 changes: 6 additions & 0 deletions src/Qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function __construct(...$attributes)

$this
->exceptOnForms()
->margin(0)
->indexSize(50)
->detailSize(200);
}
Expand All @@ -47,6 +48,11 @@ public function detailSize(int $size)
return $this->withMeta(['detailSize' => $size]);
}

public function margin(int $size)
{
return $this->withMeta(['margin' => $size]);
}

protected function _renderImage($url = null)
{
if ($url and curl_init($url)) {
Expand Down

0 comments on commit 8c0449e

Please sign in to comment.