@botonic/react
Version:
Build Chatbots using React
19 lines • 770 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import styled from 'styled-components';
import { COLORS } from '../constants';
import { renderComponent } from '../util/react';
const SubtitleContainer = styled.div `
font-size: 12px;
padding: 0px 15px 10px 15px;
color: ${COLORS.MID_GRAY};
`;
export const Subtitle = props => {
const renderBrowser = () => (_jsx(SubtitleContainer, Object.assign({ style: Object.assign({}, props.style) }, { children: props.children })));
const renderNode = () => _jsx("desc", { children: props.children });
return renderComponent({ renderBrowser, renderNode });
};
Subtitle.serialize = subtitleProps => {
return { subtitle: subtitleProps.children };
};
//# sourceMappingURL=subtitle.js.map