-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storybook UI theming #3628
Storybook UI theming #3628
Changes from 116 commits
898c1f4
bae0a2a
f546481
ee4a416
c6e704c
4c39c8b
313486f
b45b078
4ea75bb
b668f5a
af097bc
af506f2
e6096cc
e9ce090
eddf2b7
74de615
79fc816
f72ce62
63613ec
92850ed
011142c
98dc2fa
a2af2be
f00243a
78c9a3e
57c50f4
35c8838
c801905
2f5cf2f
4230448
ac9278f
2a49259
bab52c7
b8f8d95
8714ed7
87be909
b6549d6
9187462
d0b507e
dd6037f
26fe6f5
e76e9c7
46cdbac
5c32f8e
8701b83
b542d4c
5fc9c08
8366b67
978e7e5
5ac92f3
26b2bc5
407369b
3ce57aa
fb372a0
c3f43d9
12237db
6d3c806
996d276
9d503c2
7395379
4389c20
cc68e66
d2faeb7
1a5e90d
41badab
1b5daf3
19bf77c
b642121
e66d323
29ac4c8
18ef6de
f877ac9
bd595a4
398bcf9
44a8c36
370b56f
1ded5f9
c49dff9
9ea4117
44fb086
a1bdf16
6d198dd
9c3788c
0289456
53ba1cf
f735795
28eb275
313c8f3
6ec6328
128066d
b022803
d90aa8d
1dba82b
677558c
a5d5567
c4cee7a
b2c3d90
fe0311f
9344955
959880e
9d2a015
7d14ef9
97b8165
b3ca126
691aece
2995b30
2991bc3
a9cdac8
18b5a43
0e84684
ed96067
0a2a99c
62d1236
61e0b4a
c626f54
79a5e34
6db311d
0dce8f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ import Panel from './components/Panel'; | |
import { ADDON_ID, PANEL_ID } from './shared'; | ||
|
||
function init() { | ||
addons.register(ADDON_ID, () => { | ||
addons.register(ADDON_ID, api => { | ||
const channel = addons.getChannel(); | ||
addons.addPanel(PANEL_ID, { | ||
title: 'Accessibility', | ||
render() { | ||
return <Panel />; | ||
}, | ||
// eslint-disable-next-line react/prop-types | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally not a huge fan of these. Is there a reason? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm passing down a function, not a component.. Or is the comment regarding the switched based on |
||
render: ({ active }) => <Panel channel={channel} api={api} active={active} />, | ||
}); | ||
}); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implement this as
children
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I could I'm unsure it would be an improvement. As each tab gets a
active
prop passed from theTabs
|TabState
component.Do you have an implementation in mind, that looks better than this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would look better to me:
To implement it, you can just change those lines to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we could also use some tab identifier other than index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just pushed a refactor to make this component behave more like your proposal. Do you like it?