How to use the reakit/Tab.useTabState function in reakit

To help you get started, we’ve selected a few reakit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codesandbox / codesandbox-client / packages / app / src / app / pages / Profile / Profile.tsx View on Github external
export const Profile: React.FC = ({
  match: {
    params: { username },
    url,
  },
}) => {
  // Replace with API
  const [data, setData] = useState(initialState);
  const [query, setQuery] = useState(``);
  const [isEditing, setIsEditing] = useState(false);
  const tabs = useTabState({
    manual: true,
    orientation: 'vertical',
    selectedId: 'Sandboxes',
  });

  const {
    state: {
      profile: { current: user, notFound },
    },
    actions: {
      profile: { profileMounted },
    },
  } = useOvermind();

  useEffect(() => {
    profileMounted({ username });
github SaraVieira / svg-to-jsx-electron / src / components / App.js View on Github external
const App = () => {
  const tab = useTabState({ selectedId: "code" })
  return (
    <>
      
        
          Import SVG Code
        
        
          Import SVG File
        
        
          Settings
github codesandbox / codesandbox-client / packages / app / src / app / components / CreateNewSandbox / CreateSandbox / CreateSandbox.tsx View on Github external
export const CreateSandbox: React.FC = props => {
  const { state } = useOvermind();
  const tab = useTabState({
    orientation: 'vertical',
    selectedId: state.isFirstVisit ? 'Welcome' : 'Create',
  });

  return (
    
      
        
          
          Welcome
        
        
          
          Create Sandbox
github SaraVieira / svg-to-jsx / electron-app / src / components / App.js View on Github external
const App = () => {
  const tab = useTabState({ selectedId: 'code' })
  return (
    <>
      
        
          Import SVG Code
        
        
          Import SVG File
github codesandbox / codesandbox-client / packages / app / src / app / pages / Dashboard / Content / CreateNewSandbox / NewSandboxModal / NewSandboxModal.tsx View on Github external
({
      forking = false,
      closing = false,
      createSandbox,
      store: { user },
    }: INewSandboxModalProps) => {
      const tabState = useTabState({ selectedId: '0' });

      const tabs: ITab[] = [
        'Overview',
        user && 'My Templates',
        'Client Templates',
        'Container Templates',
        'Import',
      ]
        .map((buttonName, index) => ({
          name: buttonName,
          tabIndex: String(index),
        }))
        .filter(({ name }) => Boolean(name));

      React.useEffect(() => {
        const selectedTab = tabs[tabState.currentId];