Improve AccessibleButton & related types (#12075)
* Fix wrong type enum usage Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use improved type definition for forwardRef which enables Generic props Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve AccessibleButton & related Props types Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove useless comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
e26d3e9b68
commit
af31965866
17 changed files with 109 additions and 79 deletions
|
@ -73,11 +73,7 @@ export default function ExtraTile({
|
|||
);
|
||||
if (isMinimized) nameContainer = null;
|
||||
|
||||
let Button = RovingAccessibleButton;
|
||||
if (isMinimized) {
|
||||
Button = RovingAccessibleTooltipButton;
|
||||
}
|
||||
|
||||
const Button = isMinimized ? RovingAccessibleTooltipButton : RovingAccessibleButton;
|
||||
return (
|
||||
<Button
|
||||
className={classes}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ForwardedRef, forwardRef } from "react";
|
||||
import React, { ForwardedRef, forwardRef, FunctionComponent } from "react";
|
||||
import { FormattingFunctions, MappedSuggestion } from "@matrix-org/matrix-wysiwyg";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
|
@ -120,6 +120,6 @@ const WysiwygAutocomplete = forwardRef(
|
|||
},
|
||||
);
|
||||
|
||||
WysiwygAutocomplete.displayName = "WysiwygAutocomplete";
|
||||
(WysiwygAutocomplete as FunctionComponent).displayName = "WysiwygAutocomplete";
|
||||
|
||||
export { WysiwygAutocomplete };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue