Skip to content

Commit bef22e2

Browse files
🔖 Update version to 0.0.16 (#22)
Update version to 0.0.16
2 parents 22cd408 + 73d62d6 commit bef22e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1871
-1062
lines changed

.drone.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ name: components
66
steps:
77
- name: npm_auth
88
image: robertstettner/drone-npm-auth
9-
environment:
109
settings:
1110
registry: npm.pkg.github.com
1211
token:
@@ -29,7 +28,6 @@ steps:
2928

3029
- name: code-analysis
3130
image: committed/drone-sonarqube-node
32-
detach: true
3331
environment:
3432
SONAR_HOST:
3533
from_secret: sonar_host
@@ -40,6 +38,9 @@ steps:
4038
when:
4139
branch:
4240
- master
41+
event:
42+
exclude:
43+
- pull_request
4344

4445
- name: slack
4546
image: plugins/slack
@@ -51,5 +52,18 @@ steps:
5152
from_secret: slack_template
5253
when:
5354
status:
54-
- success
5555
- failure
56+
57+
- name: announce
58+
image: plugins/slack
59+
settings:
60+
channel: group-dev
61+
webhook:
62+
from_secret: slack_webhook
63+
template: >
64+
:tada: New version ${DRONE_TAG} of `@commitd/components` available
65+
when:
66+
ref:
67+
- refs/tags/v*
68+
status:
69+
- success

.storybook/addons.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ import '@storybook/addon-docs/register'
22
import '@storybook/addon-actions/register'
33
import '@storybook/addon-links/register'
44
import '@storybook/addon-a11y/register'
5-
import { STORY_CHANGED } from '@storybook/core-events'
5+
import { STORIES_CONFIGURED } from '@storybook/core-events'
66

77
import addonAPI from '@storybook/addons'
88

9-
let firstLoad = true
109
addonAPI.register('committed/components', storybookAPI => {
11-
// This doesn't currently work due to a bug in storybook
12-
// storybookAPI.on(STORY_CHANGED, (kind, story) => {
13-
// console.log('called')
14-
// if (firstLoad) {
15-
// firstLoad = false // make sure to set this flag to false, otherwise you will never be able to look at another story.
16-
// storybookAPI.selectStory('Design System', 'Introduction')
17-
// }
18-
// })
10+
storybookAPI.on(STORIES_CONFIGURED, (kind, story) => {
11+
if (storybookAPI.getUrlState().path === '/story/*') {
12+
storybookAPI.selectStory('Design System', 'Introduction')
13+
}
14+
})
1915
})

.storybook/config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ addParameters({
3232
}
3333
})
3434

35-
configure(require.context('../src/stories', true, /\.(tsx|mdx)$/), module)
35+
configure(require.context('../src', true, /\.stories\.(tsx|mdx)$/), module)

README.md

Lines changed: 1 addition & 0 deletions

example/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Content = () => (
5050
'Rejux',
5151
'Baleen'
5252
].map((name, index) => (
53-
<Post name={name} index={index} />
53+
<Post key={name} name={name} index={index} />
5454
))}
5555
</C.Flex>
5656
<C.Box mb={5}>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@commitd/components",
3-
"version": "0.0.15",
3+
"version": "0.0.16",
44
"description": "Committed Component Library",
55
"author": "Committed",
66
"license": "UNLICENSED",
@@ -83,7 +83,7 @@
8383
"pretty-quick": "^1.11.1",
8484
"prop-types": "^15.7.2",
8585
"react": "^16.9.0",
86-
"react-docgen-typescript-loader": "^3.1.1",
86+
"react-docgen-typescript-loader": "^3.3.0",
8787
"react-dom": "^16.9.0",
8888
"react-scripts-ts": "^2.16.0",
8989
"rollup": "^0.62.0",

src/components/appbar/AppBar.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import { ComponentType, FC } from 'react'
22
import { styled } from '@material-ui/styles'
33
import { fonts, Theme } from '../../theme'
44
import MaterialAppBar, {
@@ -7,11 +7,17 @@ import MaterialAppBar, {
77

88
export type AppBarProps = MaterialAppBarProps
99

10-
export const AppBar = styled<React.ComponentType<AppBarProps>>(MaterialAppBar)(
10+
export const AppBar: ComponentType<AppBarProps> = styled(MaterialAppBar)(
1111
({ theme }: { theme: Theme }) => ({
1212
'& h1, h2, h3, h4, h5, h6': {
1313
fontSize: fonts.sizes[1],
1414
fontWeight: theme.typography.fontWeightMedium
1515
}
1616
})
1717
)
18+
19+
// For documentation only
20+
export type BaseAppBarProps = Pick<AppBarProps, 'position' | 'color'>
21+
export type RestAppBarProps = Omit<AppBarProps, keyof BaseAppBarProps>
22+
export const BaseAppBarDocs: FC<BaseAppBarProps> = () => null
23+
export const RestAppBarDocs: FC<RestAppBarProps> = () => null

src/stories/components/appBar.mdx renamed to src/components/appbar/appBar.stories.mdx

Lines changed: 14 additions & 1 deletion

0 commit comments

Comments
 (0)