react-antd-admin-panel
Version:
Easy prototyping admin panel using React and Antd
15 lines • 931 B
JavaScript
import React, { useEffect, useRef, useState } from "react";
import { Typography as TypographyAnt } from 'antd';
const Title = (props) => {
var _a, _b;
const model = props.model;
const [showStep, setShowStep] = useState((_a = model._step) !== null && _a !== void 0 ? _a : false);
const [step, setStep] = useState((_b = model._stepDefault) !== null && _b !== void 0 ? _b : false);
model._ref = useRef();
useEffect(() => { }, [model]);
return (React.createElement("div", { ref: model._ref, style: model._level !== 5 ? {} : { marginTop: 16, marginBottom: 8 } },
React.createElement(TypographyAnt, null,
React.createElement(TypographyAnt.Title, { level: model._level, style: Object.assign(Object.assign({}, model._style), { fontWeight: 200 }) }, model._label && (React.createElement("div", null, model._label))))));
};
export default Title;
//# sourceMappingURL=Title.js.map