0.0.8 • Published 5 years ago

@c8s/tab v0.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

@c8s/tab

github npm:version typescript license browserslist code style:prettier

Usage

/**
 * As to prepare of using the `Tab`
 * 
 * ```bash
 * yarn add @c8s/tab @c8s/theme react @types/react styled-components @types/styled-components
 * ```
 */
import Tab from '@c8s/tab';
import {Theme, theme} from '@c8s/theme';

Example

() => (
  <Theme theme={theme}>
    {/* ... */}
      <Tab labels={['foo', 'bar']} position="top">
        {([FooPanel, BarPanel]) => {
          return (
            <>
              <FooPanel>
                <div>
                  <div>foo</div>
                  <div>bar</div>
                  <div>baz</div>
                </div>
              </FooPanel>
              <BarPanel>
                <div>
                  <div>hoge</div>
                  <div>fuga</div>
                  <div>piyo</div>
                </div>
              </BarPanel>
            </>
          );
        }}
      </Tab>
    {/* ... */}
  </Theme>
);

Contributors

Thanks goes to these wonderful people (emoji key):

純📖Aki-Japan📖

This project follows the all-contributors specification. Contributions of any kind welcome!