Fix: AccessibleButton does not set disabled attribute (PSF-1055) (#8682)
* remove old styles for pin drop buttons Signed-off-by: Kerry Archibald <kerrya@element.io> * fully disable share location button until location is shared Signed-off-by: Kerry Archibald <kerrya@element.io> * set disabled on button Signed-off-by: Kerry Archibald <kerrya@element.io> * test AccessibleButton disabled Signed-off-by: Kerry Archibald <kerrya@element.io> * remove disbaled check in LocationPicker Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
0d1bb3bd9a
commit
14cf6275d0
7 changed files with 291 additions and 9 deletions
|
@ -0,0 +1,62 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<AccessibleButton /> renders a button element 1`] = `
|
||||
<AccessibleButton
|
||||
element="button"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<button
|
||||
className="mx_AccessibleButton"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
i am a button
|
||||
</button>
|
||||
</AccessibleButton>
|
||||
`;
|
||||
|
||||
exports[`<AccessibleButton /> renders div with role button by default 1`] = `
|
||||
<AccessibleButton
|
||||
element="div"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<div
|
||||
className="mx_AccessibleButton"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
i am a button
|
||||
</div>
|
||||
</AccessibleButton>
|
||||
`;
|
||||
|
||||
exports[`<AccessibleButton /> renders with correct classes when button has kind 1`] = `
|
||||
<AccessibleButton
|
||||
element="div"
|
||||
kind="primary"
|
||||
onClick={[MockFunction]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
<div
|
||||
className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
|
||||
onClick={[MockFunction]}
|
||||
onKeyDown={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
>
|
||||
i am a button
|
||||
</div>
|
||||
</AccessibleButton>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue