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

Are checkboxes supported? #25

Closed
Pdawg05 opened this issue Mar 31, 2023 · 1 comment
Closed

Are checkboxes supported? #25

Pdawg05 opened this issue Mar 31, 2023 · 1 comment

Comments

@Pdawg05
Copy link

Pdawg05 commented Mar 31, 2023

Are checkboxes supported, if not is there any plan to add them?

I can't seem to find any check box classes so im assuming they're not implented

@nicklambourne
Copy link
Owner

nicklambourne commented Jun 12, 2023

They are now! (as of version 0.9.6 / #27). Apologies for the delay in getting back to you, I decided to implement all outstanding elements in one go, which took longer than anticipated.

from slackblocks import CheckboxGroup, Option, Text, TextType

OPTION_A = Option(text=Text("A", type_=TextType.PLAINTEXT), value="A")
OPTION_B = Option(text=Text("B", type_=TextType.PLAINTEXT), value="B")
OPTION_C = Option(text=Text("C", type_=TextType.PLAINTEXT), value="C")
THREE_OPTIONS = [OPTION_A, OPTION_B, OPTION_C]

checkbox = CheckboxGroup(
      options=THREE_OPTIONS, action_id="and...action", initial_options=OPTION_A
)

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

No branches or pull requests

2 participants