Skip to content

Commit

Permalink
chore(react-aria): restructure folder organization (#24884)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus authored Sep 21, 2022
1 parent 5ede3c8 commit ce5f1ec
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: restructure folder organization",
"packageName": "@fluentui/react-aria",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { useARIAButtonShorthand } from '../useARIAButton';
import type { ARIAButtonSlotProps } from '../useARIAButton';
import { useARIAButtonShorthand } from '../button';
import type { ARIAButtonSlotProps } from '../button';
import { getSlots } from '@fluentui/react-components';
import type { ComponentState, Slot } from '@fluentui/react-components';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ describe('useARIAButtonShorthands', () => {
const {
result: { current: buttonShorthand },
} = renderHook(() => useARIAButtonShorthand({ as: 'button' }));
expect(buttonShorthand.as).toBe('button');
expect(buttonShorthand?.as).toBe('button');
const {
result: { current: buttonShorthand2 },
} = renderHook(() => useARIAButtonShorthand({ as: undefined }));
expect(buttonShorthand2.as).toBe(undefined);
const {
result: { current: anchorShorthand },
} = renderHook(() => useARIAButtonShorthand({ as: 'a' }));
expect(anchorShorthand.as).toBe('a');
expect(anchorShorthand?.as).toBe('a');
const {
result: { current: divShorthand },
} = renderHook(() => useARIAButtonShorthand({ as: 'div' }));
expect(divShorthand.as).toBe('div');
expect(divShorthand?.as).toBe('div');
});
});
4 changes: 2 additions & 2 deletions packages/react-components/react-aria/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { useARIAButtonShorthand, useARIAButtonProps } from './hooks/useARIAButton/index';
export { useARIAButtonShorthand, useARIAButtonProps } from './button/index';
export type {
ARIAButtonSlotProps,
ARIAButtonProps,
ARIAButtonResultProps,
ARIAButtonType,
ARIAButtonElement,
ARIAButtonElementIntersection,
} from './hooks/useARIAButton/index';
} from './button/index';

0 comments on commit ce5f1ec

Please sign in to comment.