File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
docs/src/pages/components/buttons Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -145,24 +145,26 @@ If you wish to use `not-allowed`, you have two options:
145145
1461461 . ** CSS only** . You can remove the pointer events style on the disabled state of the ` <button> ` element:
147147
148- ``` css
149- .MuiButtonBase-root :disabled {
150- cursor : not-allowed ;
151- pointer-events : auto ;
152- }
153- ```
148+ ``` css
149+ .MuiButtonBase-root :disabled {
150+ cursor : not-allowed ;
151+ pointer-events : auto ;
152+ }
153+ ```
154154
155- However:
155+ However:
156156
157- - You should add ` pointer-events: none; ` back when you need to display [ tooltips on disabled elements] ( /components/tooltips/#disabled-elements )
158- - The cursor won't change if you render something other than a button element, for instance, a link ` <a> ` element.
157+ - You should add ` pointer-events: none; ` back when you need to display [ tooltips on disabled elements] ( /components/tooltips/#disabled-elements )
158+ - The cursor won't change if you render something other than a button element, for instance, a link ` <a> ` element.
159159
1601602 . ** DOM change** . You can wrap the button:
161161
162- ``` jsx
163- < span style= {{ cursor: " not-allowed" }}>
164- < Button component= {Link} disabled> disabled< / Button>
165- < / span>
166- ```
162+ ``` jsx
163+ < span style= {{ cursor: ' not-allowed' }}>
164+ < Button component= {Link} disabled>
165+ disabled
166+ < / Button>
167+ < / span>
168+ ```
167169
168- This has the advantage of supporting any element, for instance, a link ` <a> ` element.
170+ This has the advantage of supporting any element, for instance, a link ` <a> ` element.
You can’t perform that action at this time.
0 commit comments