Skip to content

Commit 698dc9a

Browse files
committed
Add RovingFocusGroup component with RovingFocusRoot
1 parent 4ccbeaf commit 698dc9a

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createContext } from 'react';
2+
3+
export const RovingFocusRootContext = createContext({});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const RovingFocusRoot = ({ children }: { children: React.ReactNode }) => {
4+
return <div>RovingFocusRoot</div>;
5+
};
6+
7+
export default RovingFocusRoot;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import RovingFocusRoot from './fragments/RovingFocusRoot';
2+
3+
const RovingFocusGroup = {
4+
Root: RovingFocusRoot
5+
};
6+
7+
export default RovingFocusGroup;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import SandboxEditor from '~/components/tools/SandboxEditor/SandboxEditor';
2+
import React from 'react';
3+
4+
import RovingFocusGroup from '../index';
5+
6+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
7+
export default {
8+
title: 'WIP/RovingFocusGroup',
9+
component: RovingFocusGroup,
10+
render: () => <>
11+
<SandboxEditor className="space-y-2">
12+
<RovingFocusGroup.Root>
13+
<div>RovingFocusGroup</div>
14+
</RovingFocusGroup.Root>
15+
</SandboxEditor>
16+
</>
17+
};
18+
19+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
20+
export const All = {
21+
args: {
22+
className: ''
23+
}
24+
};

0 commit comments

Comments
 (0)