Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animate verify button for verify duration #558

Closed
hrzlgnm opened this issue Nov 25, 2024 · 1 comment · Fixed by #560
Closed

Animate verify button for verify duration #558

hrzlgnm opened this issue Nov 25, 2024 · 1 comment · Fixed by #560

Comments

@hrzlgnm
Copy link
Owner

hrzlgnm commented Nov 25, 2024

Something along with

let loading = create_rw_signal(false);
let on_click = move |_| {
    loading.set(true);
    set_timeout(
        move || {
            loading.set(false);
        },
        std::time::Duration::new(2, 0),
    );
};

view! {
    <Space>
        <Button loading on_click icon=icondata::AiCloseOutlined>
            "Click Me"
        </Button>
        <Button loading on_click>
            "Click Me"
        </Button>
    </Space>
}
@hrzlgnm
Copy link
Owner Author

hrzlgnm commented Nov 25, 2024

Also reduce the timeout to 5s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant