Skip to content

Commit

Permalink
Merge pull request #121 from MuhammadKurdi-CS/issue/#114/refactor-ski…
Browse files Browse the repository at this point in the history
…ll-description

refactored the skill description
  • Loading branch information
aevo98765 authored Sep 2, 2024
2 parents d4ab33b + 26c3aac commit 2e3b585
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import SkillDescriptionContent from './SkillDescriptionContent';
import { FormFieldGroupExpandable, FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form';

const SkillDescription: React.FC = () => {
return (
<FormFieldGroupExpandable
toggleAriaLabel="Details"
header={
<FormFieldGroupHeader titleText={{ text: 'Skills Description', id: 'skills-description' }} titleDescription="What are InstructLab Skills?" />
}
>
<SkillDescriptionContent />
</FormFieldGroupExpandable>
);
};

export default SkillDescription;
14 changes: 2 additions & 12 deletions src/components/Contribute/Skill/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getGitHubUsername } from '../../../utils/github';
import { useSession } from 'next-auth/react';
import YamlCodeModal from '../../YamlCodeModal';
import { AttributionData, SchemaVersion, SkillYamlData } from '@/types';
import SkillDescription from './SkillDescription';
import SkillDescription from './SkillDescription/SkillDescription';
import { dumpYaml } from '@/utils/yamlConfig';
import PathService from '@/components/PathService/PathService';

Expand Down Expand Up @@ -367,17 +367,7 @@ export const SkillForm: React.FunctionComponent = () => {
</Button>
</div>

<FormFieldGroupExpandable
toggleAriaLabel="Details"
header={
<FormFieldGroupHeader
titleText={{ text: 'Skills Description', id: 'skills-description' }}
titleDescription="What are InstructLab Skills?"
/>
}
>
<SkillDescription />
</FormFieldGroupExpandable>
<SkillDescription />

<FormFieldGroupExpandable
isExpanded
Expand Down

0 comments on commit 2e3b585

Please sign in to comment.