All Questions
Tagged with angular-storybook javascript
10 questions
0
votes
0
answers
139
views
How to override component method from angular storybook
In the component I have a method onExample. I am trying to override the functionality of the onExample method from the storybook. As you can see below, I have tried to add the method as argTypes and ...
0
votes
0
answers
122
views
Can Angular Storybook Providers Dynamically Set Default Language Based on Query String?
I'm utilizing the Storybook-i18n library for internationalization support within Storybook.
Upon changing the language, it also reflects in the URL, like so: locale:en
http://localhost:4400/?path=/...
3
votes
0
answers
570
views
Setting the minimum width and height for the element that storybook uses to render components?
I have a component that "Snaps" into the width and height of the parent container.
By itself it does not have a width and a height. So if I configure the story like this:
export const ...
2
votes
1
answer
1k
views
Running Storybook on an Angular Library Project
I created a new Angular Workspace.
ng new workspace --create-application=false
cd workspace
And then generated a library within the workspace.
ng g library lib
I also generated a playground for ...
0
votes
0
answers
222
views
Named Imports are not working properly, Storybook adds everything present the folder to the bundle
Whenever I use named imports, Storybook includes everything in the index file into the build, which eventually increases the bundle size.
main.js
module.exports = {
stories: ["../src/**/*....
0
votes
0
answers
244
views
Import react component and add to dom automatically
I am trying to run my jsx within a javascript file like this:
import React from 'react'
export class HeaderNav extends React.Component {
constructor(props) {
super(props)
console.log('...
0
votes
1
answer
1k
views
How can I update Angular component with observable or subject in Storybook?
I want to use a subject to update my Angular component, but it's not work when I call subject.next(false) in Storybook. The property of component instance has updated but not work for canvas panel.
I ...
1
vote
3
answers
2k
views
Storybook: can't change theming color on UI
I'm trying to create my own theme in Storybook, and I'm following this: https://storybook.js.org/docs/angular/configure/theming
For now I copied the the files from the sites, and that works, but I can'...
9
votes
1
answer
2k
views
Angular Storybook - Is there a way to generate .stories.ts files automatically
I'm looking to generate a .stories.ts file inside a component folder once we have run ng g component my-component.
The final result should look somehting like this:
my-component
-my-component....
0
votes
1
answer
798
views
set component params in storybook
I have created a simple story in angular, but the story params don't show up in the component.
Story:
export const myStory = (args: FileExplorerComponent) => ({
component: FileExplorerComponent,...