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

Add disabled property to Radio #425

Closed
wants to merge 2 commits into from

Conversation

namakshenas
Copy link
Contributor

No description provided.

Copy link

Generated link: snehilvj/dash-mantine-components-425

@AnnMarieW
Copy link
Collaborator

Here is a sample app hosted on PyCafe

image

@AnnMarieW
Copy link
Collaborator

Great job on the PR. Thanks for your first DMC contribution 🎉

Just a couple tips:

  • It's a good practice to create a branch in your cloned dmc repository for making changes, instead of using the master branch. No need to update anything for this PR—just a note for future contributions.

  • In the PR description, If you include:

closes #424

then the associated issue will automatically close when the PR is merged, and it will indicate there's an active PR linked to that issue.


Additions

For Radio

/** Wrapper for input type radio. */

Then for the RadioGroup

/** The RadioGroup gives user radio inputs to allow only one selection from a small set of options. */

Feel free to change it if you have any better descritpions

# Unreleased

### Added
- Added `disabled` prop to `Radio`  #425  by @namakshenas 

Tests
No need to add at test when it's just a prop passed to the Mantine component.

@AnnMarieW
Copy link
Collaborator

Here's another example that will be good for the docs - a disabled RadioGroup

App on Pycafe
image

import dash_mantine_components as dmc
from dash import Dash, dcc, _dash_renderer

_dash_renderer._set_react_version("18.2.0")

app = Dash(external_stylesheets=dmc.styles.ALL)

component = dmc.RadioGroup(
    children=dmc.Group([
        dmc.Radio("A", disabled=True, value="A"),
        dmc.Radio("B", disabled=True, value="B"),
        dmc.Radio("C", disabled=True, value="C")
    ]),
    value="A",
    label="Select an item",
    m="lg"
)



app.layout = dmc.MantineProvider([component])


if __name__ == "__main__":
    app.run(debug=True)

@namakshenas namakshenas closed this by deleting the head repository Nov 21, 2024
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 this pull request may close these issues.

2 participants