Skip to main content
Published
Jul 27, 2024
2y ago
Total Downloads
946
946

Install

dotnet add package Glutinum.Feliz.ReactSignaturePadWrapper --version 1.0.2
ProductVersions
.NET Standard
netstandard2.1

README

Glutinum.Feliz.ReactSignaturePadWrapper

NuGet

Binding for react-signature-pad-wrapper.

Usage

open Feliz
open Glutinum.SignaturePad
open Glutinum.Feliz.ReactSignaturePadWrapper

open type Glutinum.Feliz.ReactSignaturePadWrapper.Exports

[<ReactComponent>]
let App () =
    let signaturePadRef = React.useRef<SignaturePad option> None

    Html.div [
        SignaturePad [
            signaturePad.ref signaturePadRef
            signaturePad.redrawOnResize true
        ]

        Html.button [
            prop.text "Clear"
            prop.onClick (fun _ ->
                if signaturePadRef.current.IsSome then
                    signaturePadRef.current.Value.clear ()
            )
        ]
        Html.button [
            prop.text "Save"
            prop.onClick (fun _ ->
                if signaturePadRef.current.IsSome then
                    let base64URL = signaturePadRef.current.Value.toDataURL ()
                    debugBase64 base64URL
            )
        ]
    ]

Changes from Previous Version

No structural changes between v1.0.1 and v1.0.2.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.