Subroh Nishikori
06/14/2020, 5:05 PMbrowserDevelopmentWebpack
and load it into the Storybook.
Also, a file simply transpiled to JS will cause great difficulty in resolving library dependencies for `kotlin-wrappers`(Because the npm module distribution has stopped since pre.91😭)
Do you have any good ideas about this?turansky
06/14/2020, 7:03 PMBut it seems impossible to get a specific Component from the JS generated byspecific Component = separate JS file?and load it into the Storybook.browserDevelopmentWebpack
Subroh Nishikori
06/15/2020, 12:18 AMspecific Component = separate JS file?Yes. If I can handle React Component implemented in Kotlin/JS from JS, as shown below, I will be able to meet the requirements.
import React from 'react';
import { action } from '@storybook/addon-actions';
import TestButton from '../build/js/test-component'; // ←from Kotlin/JS artifacts
export default {
component: TestButton,
title: 'TestButton',
};
export const text = () => <TestButton onClick={action('clicked')}>Hello Button</TestButton>;
turansky
06/15/2020, 1:23 AMSubroh Nishikori
06/16/2020, 7:57 AM