Alexey Safronov
03b03ed910
# Conflicts: # packages/client/public/images/actions.upload.react.svg # packages/client/public/images/empty_screen_privacy.png # packages/client/public/locales/en/SingleSignOn.json # packages/client/public/locales/ru/SingleSignOn.json # packages/client/src/helpers/constants.js # packages/client/src/pages/PortalSettings/categories/integration/index.js # packages/client/src/pages/PortalSettings/categories/integration/sub-components/consumerItem.js # packages/client/src/pages/PortalSettings/categories/integration/sub-components/consumerModalDialog.js # packages/client/src/pages/PortalSettings/categories/integration/sub-components/consumerToggle.js # packages/client/src/pages/PortalSettings/categories/integration/sub-components/modalDialogContainer.js # packages/client/src/pages/PortalSettings/categories/integration/sub-components/ssoLoader.js # packages/client/src/pages/PortalSettings/categories/integration/thirdPartyServicesSettings.js # packages/client/src/store/SsoFormStore.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/ThirdPartyServicesSettings/index.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerItem.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerModalDialog.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/ThirdPartyServicesSettings/sub-components/consumerToggle.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/ThirdPartyServicesSettings/sub-components/modalDialogContainer.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/sub-components/consumerItem.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/sub-components/consumerModalDialog.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/sub-components/consumerToggle.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/sub-components/modalDialogContainer.js # web/ASC.Web.Client/src/components/pages/Settings/categories/integration/thirdPartyServicesSettings.js
72 lines
1.6 KiB
JavaScript
72 lines
1.6 KiB
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import StyledText from "./styled-text";
|
|
|
|
const Text = ({
|
|
title,
|
|
tag,
|
|
as,
|
|
fontSize,
|
|
fontWeight,
|
|
color,
|
|
textAlign,
|
|
...rest
|
|
}) => {
|
|
return (
|
|
<StyledText
|
|
fontSizeProp={fontSize}
|
|
fontWeightProp={fontWeight}
|
|
colorProp={color}
|
|
textAlign={textAlign}
|
|
as={!as && tag ? tag : as}
|
|
title={title}
|
|
{...rest}
|
|
/>
|
|
);
|
|
};
|
|
|
|
Text.propTypes = {
|
|
/** Sets the tag through which to render the component */
|
|
as: PropTypes.string,
|
|
tag: PropTypes.string,
|
|
/** Sets background color */
|
|
backgroundColor: PropTypes.string,
|
|
/** Specifies the text color */
|
|
color: PropTypes.string,
|
|
/** Sets the 'display' property */
|
|
display: PropTypes.string,
|
|
/** Sets the font size */
|
|
fontSize: PropTypes.string,
|
|
/** Sets the font weight */
|
|
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
/** Sets font weight value to bold */
|
|
isBold: PropTypes.bool,
|
|
/** Sets the 'display: inline-block' property */
|
|
isInline: PropTypes.bool,
|
|
/** Sets the font style */
|
|
isItalic: PropTypes.bool,
|
|
/** Sets the line height */
|
|
lineHeight: PropTypes.string,
|
|
/** Disable selection of text*/
|
|
noSelect: PropTypes.bool,
|
|
/** Sets the 'text-align' property */
|
|
textAlign: PropTypes.string,
|
|
/** Title */
|
|
title: PropTypes.string,
|
|
/** Disables word wrapping */
|
|
truncate: PropTypes.bool,
|
|
};
|
|
|
|
Text.defaultProps = {
|
|
title: null,
|
|
textAlign: "left",
|
|
fontSize: "13px",
|
|
truncate: false,
|
|
isBold: false,
|
|
isInline: false,
|
|
isItalic: false,
|
|
noSelect: false,
|
|
};
|
|
|
|
export default React.memo(Text);
|