Skip to content

Commit

Permalink
fix: radio-dialog conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
varholak-peter committed Dec 7, 2021
1 parent da2d61c commit 356d301
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-dialog/src/components/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { DialogProps } from './Dialog.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';

/**
* Dialog component
* A Dialog is an elevated Card triggered by a user’s action.
*/
export const Dialog: ForwardRefComponent<DialogProps> = React.forwardRef((props, ref) => {
const state = useDialog(props, ref);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Dialog renders a default state 1`] = `
<div>
<div
class="fui-Dialog"
>
Default Dialog
</div>
</div>
`;
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';
import type { DialogState } from './Dialog.types';

export const dialogClassName = 'fui-Dialog';

/**
* Styles for the root slot
*/
Expand All @@ -17,7 +19,7 @@ const useStyles = makeStyles({
*/
export const useDialogStyles = (state: DialogState): DialogState => {
const styles = useStyles();
state.root.className = mergeClasses(styles.root, state.root.className);
state.root.className = mergeClasses(dialogClassName, styles.root, state.root.className);

// TODO Add class names to slots, for example:
// state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
Expand Down

0 comments on commit 356d301

Please sign in to comment.