Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.circleci
lib
5 changes: 0 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"settings": {
"import/resolver": {
"babel-module": {}
}
}
}
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run build
git add lib
15 changes: 15 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
# Deps
.depsrc

# Build
build
gulpfile.*

# Jest
__tests__
jest.config.cjs

# Coverage
.coverage

# Storybook
.storybook
stories

# TypeScript
tsconfig.json
jsconfig.json
10 changes: 0 additions & 10 deletions .storybook/main.js

This file was deleted.

18 changes: 18 additions & 0 deletions .storybook/main.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type { import('@storybook/react-webpack5').StorybookConfig } */

export default {
stories: [
'../stories/**/*.stories.jsx'
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials'
],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
docs: {
autodocs: 'tag'
}
}
6 changes: 6 additions & 0 deletions .storybook/manager.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api'
import { themes } from '@storybook/theming'

addons.setConfig({
theme: themes.light
})
54 changes: 54 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<style type="text/css">

* {
font-family: Arial, Helvetica, sans-serif;
}

ul.tab-group {
list-style-type: none;

background-color: #444444;
border-radius: 4px;
border-bottom: 2px solid #222222;
display: block;

margin: 0;
padding: 0;
}

li.tab {
cursor: pointer;

display: inline-block;
background-color: transparent;
color: white;

border-radius: 0;

border-bottom: 2px solid #222222;

margin: 0 0 -2px 0;
padding: .5rem 1rem;

height: calc(100% + 2px);
}

li.tab.selected {
display: inline-block;
background-color: white;
color: #222222;

border-top-left-radius: 4px;
border-top-right-radius: 4px;

border-top: 2px solid #222222;
border-right: 2px solid #222222;
border-bottom: 2px solid white;
border-left: 2px solid #222222;
}

div.tab-panel {
padding: 1rem;
}

</style>
14 changes: 14 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
13 changes: 13 additions & 0 deletions .storybook/preview.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react').Preview } */

export default {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
}
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Content can be declared either as children or as the return of a function assign

If your component extends `PureComponent` or is presentational, you might prefer to declare content as children.

Otherwise, you might prefer to assign a function to the `render` prop, so that rendering is deferred until the tab is selected.
Otherwise, you can assign a function to the `render` prop, so that rendering is deferred until the tab is selected.

### Content as children

Expand Down Expand Up @@ -99,7 +99,7 @@ Similarly, they can be declared in any combination.

## Demonstrating _react-tab-set_

[Example `Storybooks` are available on GitHub](https://github.com/sequencemedia/react-tab-set).
[Example `Storybooks` are available](https://github.com/sequencemedia/react-tab-set).

Clone the repository, then:

Expand Down
2 changes: 0 additions & 2 deletions babel.config.js → babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ module.exports = (api) => {
if (api) api.cache.using(env)

return {
compact: true,
comments: false,
presets
}
}
2 changes: 0 additions & 2 deletions index.js

This file was deleted.

1 change: 1 addition & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/index.cjs'
1 change: 0 additions & 1 deletion lib/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/tab-set/index.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/tab-set/is-tab-group.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/tab-set/is-tab-panel.js

This file was deleted.

Loading