Skip to content

Commit ef03530

Browse files
committed
update examples
1 parent bb1037f commit ef03530

8 files changed

+10
-4
lines changed

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.FocusStack.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import { useGlobal } from './shared';
66
const rootClass = mergeStyles({
77
'> div': {
88
// target all child FTZ roots
9-
border: '2px dashed red',
9+
border: '2px dashed blue',
1010
padding: 10,
1111
margin: 10,
1212
button: {
1313
display: 'inline-block',
1414
marginLeft: 10,
1515
},
1616
},
17+
'*:focus': { outline: '2px dashed red' },
1718
});
1819

1920
/**

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.ImperativeFocus.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const rootClass = mergeStyles({
88
width: 60,
99
display: 'block',
1010
},
11+
'*:focus': { outline: '2px dashed red' },
1112
});
1213

1314
/** Imperatively focusing the FTZ */

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.NoTabbableItems.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useProps } from './shared';
44

55
const rootClass = mergeStyles({
66
button: { height: 30, width: 60 },
7+
'*:focus': { outline: '2px dashed red' },
78
});
89

910
/**

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.PropValues.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const PropValues = () => {
1616
// don't render until props have been set
1717
props && (
1818
<div className={rootClass} onClick={ev => setButtonClicked((ev.target as HTMLButtonElement).textContent || '')}>
19-
<div id="buttonClicked">{buttonClicked}</div>
19+
<div id="buttonClicked">clicked {buttonClicked}</div>
2020
<button>before</button>
2121
<FocusTrapZone {...props}>
2222
<button>first</button>

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.TabWrappingButtonFocusZone.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FocusZone, FocusTrapZone, FocusZoneDirection, mergeStyles } from '@flue
33

44
const rootClass = mergeStyles({
55
button: { height: 30, width: 60 },
6+
'*:focus': { outline: '2px dashed red' },
67
});
78

89
/**

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.TabWrappingFocusZoneBumpers.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FocusZone, FocusTrapZone, FocusZoneDirection, mergeStyles } from '@flue
33

44
const rootClass = mergeStyles({
55
button: { width: 60, height: 30 },
6+
'*:focus': { outline: '2px dashed red' },
67
});
78

89
/**

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.TabWrappingMultiFocusZone.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FocusZone, FocusTrapZone, FocusZoneDirection, mergeStyles } from '@flue
33

44
const rootClass = mergeStyles({
55
button: { height: 30, width: 60 },
6+
'*:focus': { outline: '2px dashed red' },
67
});
78

89
/**

packages/react-examples/src/react/FocusTrapZone/e2e/FocusTrapZone.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('FocusTrapZone', () => {
6464
// it focuses first button inside FTZ instead
6565
cy.focused().should('have.text', 'first');
6666
// and the click isn't respected
67-
cy.get('#buttonClicked').should('have.text', '');
67+
cy.get('#buttonClicked').should('have.text', 'clicked ');
6868
});
6969

7070
it('Restores focus to FTZ when programmatically focusing outside FTZ', () => {
@@ -85,7 +85,7 @@ describe('FocusTrapZone', () => {
8585

8686
// click the button and verify it worked (the story updates the text when a button is clicked)
8787
cy.contains('before').realClick();
88-
cy.get('#buttonClicked').should('have.text', 'before');
88+
cy.get('#buttonClicked').should('have.text', 'clicked before');
8989

9090
// but focus is kept within the FTZ
9191
cy.focused().should('have.text', 'first');

0 commit comments

Comments
 (0)