lucid-ui
Version:
A UI component library from AppNexus.
58 lines (57 loc) • 4.28 kB
JavaScript
import React from 'react';
import createClass from 'create-react-class';
import { ToolTipDumb } from '../../../index';
const { Target, Title, Body } = ToolTipDumb;
export default createClass({
getInitialState: () => ({ isExpanded: true }),
render() {
return (React.createElement("section", { style: {
display: 'flex',
flexDirection: 'column',
} },
React.createElement("section", { style: {
marginTop: 150,
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-around',
} },
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isExpanded: this.state.isExpanded },
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "No Title or Close Button")))),
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isCloseable: true, onClose: () => this.setState({ isExpanded: false }), isExpanded: this.state.isExpanded },
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "With Close Button")))),
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isCloseable: true, onClose: () => this.setState({ isExpanded: false }), isExpanded: this.state.isExpanded },
React.createElement(Title, null, "Title"),
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "With Title and Close Button"))))),
React.createElement("section", { style: {
marginTop: 150,
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-around',
} },
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isLight: true, isExpanded: this.state.isExpanded },
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "No Title or Close Button")))),
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isLight: true, isCloseable: true, onClose: () => this.setState({ isExpanded: false }), isExpanded: this.state.isExpanded },
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "With Close Button")))),
React.createElement("div", { style: { marginTop: 60, marginBottom: 60 } },
React.createElement(ToolTipDumb, { isLight: true, isCloseable: true, onClose: () => this.setState({ isExpanded: false }), isExpanded: this.state.isExpanded },
React.createElement(Title, null, "Title"),
React.createElement(Body, null, "ToolTip is a utility component to create a transient message anchored to another component."),
React.createElement(Target, null,
React.createElement("div", null, "With Title and Close Button")))))));
},
});