Skip to content

Commit

Permalink
feat: add dialog properties to getNativeElementProps (#24698)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus authored Sep 8, 2022
1 parent 4c31b27 commit 6fd8556
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat: add dialog properties to getNativeElementProps",
"packageName": "@fluentui/react-utilities",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
htmlElementProperties,
getNativeProps,
timeProperties,
dialogProperties,
} from './properties';

const nativeElementMap: Record<string, Record<string, number>> = {
Expand All @@ -49,6 +50,7 @@ const nativeElementMap: Record<string, Record<string, number>> = {
iframe: iframeProperties,
img: imgProperties,
time: timeProperties,
dialog: dialogProperties,
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,13 @@ export const imgProperties = toObjectMap(htmlElementProperties, [
'width', // canvas, embed, iframe, img, input, object, video
]);

/**
* An array of DIALOG tag properties and events.
*
* @public
*/
export const dialogProperties = toObjectMap(htmlElementProperties, ['open', 'onCancel', 'onClose']);

/**
* An array of DIV tag properties and events.
*
Expand Down

0 comments on commit 6fd8556

Please sign in to comment.