$
Size: a a a
$
A
AT
С
AT
AT
С
AT
С
AT
AT
PD
const VideoInfoHint = ({
hint, //// или строка или React children элемент
}) => {
return (
<Hint
>
{(typeof hint === "string") ?
/* логика, если строка */ :
hint} // <-- React children элемент
</Hint>
);
};
const Template = args => <VideoInfoHintComponent {...args} />
export const Primary = Template.bind({});
Primary.args = {
hint: "СТРОКУ ЗДЕСЬ МОГУ ЗАДАТЬ",
};
export const Secondary = Template.bind({});
Secondary.args = {
hint: ????, <--- А КАК ЗДЕСЬ ЭЛЕМЕНТ CHILDREN задать?
};
С
СХ
AT
AT