PagePathWrapper.jsx 630 B

12345678910111213141516171819202122232425262728293031
  1. import React from 'react';
  2. import { PagePathLabel } from '@growi/ui';
  3. import PropTypes from 'prop-types';
  4. export class PagePathWrapper extends React.Component {
  5. render() {
  6. const classNames = [];
  7. if (!this.props.isExists) {
  8. classNames.push('lsx-page-not-exist');
  9. }
  10. return (
  11. <PagePathLabel path={this.props.pagePath} isLatterOnly additionalClassNames={classNames} />
  12. );
  13. }
  14. }
  15. PagePathWrapper.propTypes = {
  16. pagePath: PropTypes.string.isRequired,
  17. isExists: PropTypes.bool.isRequired,
  18. excludePathString: PropTypes.string,
  19. };
  20. PagePathWrapper.defaultProps = {
  21. excludePathString: '',
  22. };