chore: Remove unused prop
This commit is contained in:
@@ -104,7 +104,6 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc
|
|||||||
sectionName={sectionName}
|
sectionName={sectionName}
|
||||||
headerSize={headerSize}
|
headerSize={headerSize}
|
||||||
markdownContent={markdownFileIfExists}
|
markdownContent={markdownFileIfExists}
|
||||||
shouldReformatTitle={false}
|
|
||||||
alternativeSectionTitle={isIntroductionSection ? this.props.docsInfo.displayName : undefined}
|
alternativeSectionTitle={isIntroductionSection ? this.props.docsInfo.displayName : undefined}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export interface MarkdownSectionProps {
|
|||||||
markdownContent: string;
|
markdownContent: string;
|
||||||
headerSize?: HeaderSizes;
|
headerSize?: HeaderSizes;
|
||||||
githubLink?: string;
|
githubLink?: string;
|
||||||
shouldReformatTitle?: boolean;
|
|
||||||
alternativeSectionTitle?: string;
|
alternativeSectionTitle?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +35,6 @@ export interface MarkdownSectionState {
|
|||||||
export class MarkdownSection extends React.Component<MarkdownSectionProps, MarkdownSectionState> {
|
export class MarkdownSection extends React.Component<MarkdownSectionProps, MarkdownSectionState> {
|
||||||
public static defaultProps: Partial<MarkdownSectionProps> = {
|
public static defaultProps: Partial<MarkdownSectionProps> = {
|
||||||
headerSize: HeaderSizes.H3,
|
headerSize: HeaderSizes.H3,
|
||||||
shouldReformatTitle: true,
|
|
||||||
};
|
};
|
||||||
constructor(props: MarkdownSectionProps) {
|
constructor(props: MarkdownSectionProps) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -48,9 +46,7 @@ export class MarkdownSection extends React.Component<MarkdownSectionProps, Markd
|
|||||||
const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults;
|
const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults;
|
||||||
|
|
||||||
const id = utils.getIdFromName(sectionName);
|
const id = utils.getIdFromName(sectionName);
|
||||||
const formattedSectionName = this.props.shouldReformatTitle
|
const formattedSectionName = utils.convertCamelCaseToSpaces(sectionName);
|
||||||
? utils.convertCamelCaseToSpaces(sectionName)
|
|
||||||
: sectionName;
|
|
||||||
const title = !_.isUndefined(this.props.alternativeSectionTitle)
|
const title = !_.isUndefined(this.props.alternativeSectionTitle)
|
||||||
? this.props.alternativeSectionTitle
|
? this.props.alternativeSectionTitle
|
||||||
: formattedSectionName;
|
: formattedSectionName;
|
||||||
|
|||||||
Reference in New Issue
Block a user