Spinach Components
Usage
npm i spinach-components
import * as React from 'react';
import * as SpinachComponents from 'spinach-components';
export const Component = () => (
<SpinachComponnets.Text textSize="h1">text</SpinachComponnets.Text>
);
FAQ
declaration-build
?
What's npm script There is an issue.
https://github.com/rollup/plugins/issues/287
Why do not use path alias?
type becomes any, if use path alias. I don't know this happen
// text.tsx
import { BaseProps } from '~shared/types';
export TextProps = BaseProps & {
text: string
}
// text.stories.tsx
import { TextProps } from './text';
// type TextProps = any ←!?!?!?!?