Skip to content

Commit

Permalink
Add AsyncButton to Storybook (rancher#9399)
Browse files Browse the repository at this point in the history
* Add i18n getter

* Correct merge fix

* Add AsyncButton and merge with existing buttons
  • Loading branch information
cnotv authored Jan 8, 2024
1 parent b7bae81 commit 4059f4f
Show file tree
Hide file tree
Showing 5 changed files with 366 additions and 77 deletions.
1 change: 1 addition & 0 deletions storybook/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ window.__codeMirrorLoader = () => import(/* webpackChunkName: "codemirror" */ '@
// Defines namespaced modules for the Store.
export const store = new Vuex.Store({
getters: {
'i18n/exists': key => store.getters['i18n/t'],
'i18n/t': state => (key, args) => {
const msg = get(i18nStrings, key) || key;

Expand Down
6 changes: 6 additions & 0 deletions storybook/.storybook/store/i18n.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
namespaced: true,
getters: require("../../../shell/store/i18n.js").getters,
actions: require("../../../shell/store/i18n.js").actions,
mutations: require("../../../shell/store/i18n.js").mutations
}
54 changes: 0 additions & 54 deletions storybook/stories/components/Buttons.stories.mdx

This file was deleted.

Loading

0 comments on commit 4059f4f

Please sign in to comment.