AM
storybook 🙂Size: a a a
AM
storybook 🙂AM
EW
EW
compose(withThemeNormal, withSizeM)(BaseComponent) -> BaseComponentProps + WithThemeNormalProps + WithSizeMPropsAM
compose(withThemeNormal, withSizeM)(BaseComponent) -> BaseComponentProps + WithThemeNormalProps + WithSizeMPropsimport { ReactType } from 'react'
import { IClassNameProps, compose, composeU } from '@bem-react/core'
import { Button as ButtonPresenter } from './Button';
import { withButtonTypeLink } from './_type/Button_type_link';
import { withButtonThemeAction, IButtonThemeActionProps } from './_theme/Button_theme_action';
export interface IButtonProps extends IClassNameProps {
as?: ReactType
}
type My = IClassNameProps & IClassNameProps;
export const Button = compose(
composeU(withButtonThemeAction),
withButtonTypeLink,
)(ButtonPresenter);import React from 'react';
import { Button as BemButton, IButtonProps } from '../BEM_components/Button'
/**
* Button properties.
*/
export interface IComposedButtonProps extends IButtonProps {
}
/**
* Form Button.
*/
export const Button = (props: IComposedButtonProps) => {
return <div>
<BemButton>I'm basic</BemButton>
<BemButton type="link" href="#stub">I'm type link</BemButton>
<BemButton theme="action">I'm theme action</BemButton>
<BemButton theme="action" type="link">I'm all together</BemButton>
</div>;
};
AM
EW
IButtonProps только 2 свойства, судя по коду 🙂 ты можешь из композиции заэкстрактить все пропсы:import { ExtractProps } from '@bem-react/core'
export const EnhancedComponent = compose(...)(...)
export type EnhancedComponentProps = ExtractProps<typeof EnhancedComponent>AM
IButtonProps только 2 свойства, судя по коду 🙂 ты можешь из композиции заэкстрактить все пропсы:import { ExtractProps } from '@bem-react/core'
export const EnhancedComponent = compose(...)(...)
export type EnhancedComponentProps = ExtractProps<typeof EnhancedComponent>MF

SB
MF
AY
EZ
SB
EZ
co
*.bundles в каждой страницы-бандла при билде собирает все зависимости только конкретные для этой страницы-бандла или все зависимости по проекту в целом?common.blocks, исключаются из бандла при билде?co
EW
AY
*.bundles в каждой страницы-бандла при билде собирает все зависимости только конкретные для этой страницы-бандла или все зависимости по проекту в целом?common.blocks, исключаются из бандла при билде?MF
tablet.blocks/* и mobile.blocks/*, если у меня логика для некоторых блоков будет одинакова для этих устройств?