Skip to content

Commit

Permalink
Refactor Examples section headings and CSS styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
felipefarias committed Mar 4, 2024
1 parent a7cd49c commit 27f0d18
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/src/app/examples/assistant/gen-with-assistant/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export default function ExamSchemaGenWithAssistantExample() {
<Stack spacing={2} sx={{ ...boxForms }}>
<Stack spacing={2}>
<LoadingBackdrop open={isLoading} />
<Typography variant="h2" sx={{ ...h2Styles }}>
Generate Form Button + Auto-Fill Form:
<Typography variant="h2" sx={{ ...h2Styles, marginBottom: '0!important' }}>
Generate Form Button
</Typography>
<Typography variant="body1">
Code at <code>docs/src/app/examples/assistant/gen-with-assistant/page.tsx</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PsychologyOutlinedIcon from '@mui/icons-material/PsychologyOutlined';

import { useRequestDialog } from '../../../requestDialog';
import { useFormAssistant } from '@gptbundle/client';
import { h2Styles, boxForms } from '../../../../app/examples/formStyles';
import { h2Styles, h3Styles, boxForms } from '../../../../app/examples/formStyles';

const CATEGORY_CHOICES = ['Bug', 'Feature', 'Improvement'];
const PRIORITY_CHOICES = ['High', 'Medium', 'Low'];
Expand Down Expand Up @@ -51,8 +51,8 @@ export default function MultiFieldFormAssistant() {

return (
<Stack spacing={2} sx={{ ...boxForms }}>
<Typography variant="h2" sx={{ ...h2Styles }}>
Multi field Form
<Typography variant="h3" sx={{ ...h3Styles }}>
Multi Field Form
</Typography>
<Typography variant="body1">
Code at <code>docs/src/app/examples/assistant/multi-field-assistant/page.tsx</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LoadingButton } from '@mui/lab';
import TipsAndUpdatesOutlinedIcon from '@mui/icons-material/TipsAndUpdatesOutlined';
import { useRequestDialog } from '../../../requestDialog';
import { useFormAssistant } from '@gptbundle/client';
import { h2Styles, boxForms } from '../../../../app/examples/formStyles';
import { h2Styles, h3Styles, boxForms } from '../../../../app/examples/formStyles';

export default function SingleFieldFormAssistant() {
const { requestDialog, renderDialog, isLoading } = useRequestDialog();
Expand Down Expand Up @@ -43,10 +43,13 @@ export default function SingleFieldFormAssistant() {
marginTop: '16px!important',
}}
>
Auto-fill Form Button
AI Form Assistant
</Typography>
<Typography variant="h2" sx={{ ...h2Styles }}>
Single field Form
Auto Fill Form Button
</Typography>
<Typography variant="h3" sx={{ ...h3Styles }}>
Single Field Form
</Typography>
<Typography variant="body1">
Code at <code>docs/src/app/examples/assistant/single-field-assistant/page.tsx</code>
Expand Down
8 changes: 8 additions & 0 deletions docs/src/app/examples/formStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export const h2Styles = {
fontSize: '1.5em',
lineHeight: 1.334,
marginTop: '0!important',
marginBottom: '36px!important',
};

export const h3Styles = {
fontWeight: 500,
fontSize: '1.25em',
lineHeight: 1.6,
marginTop: '0!important',
};

export const boxForms = {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/examples/generation/legal-form/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function LegalSchemaGenExample() {
<Stack spacing={2}>
<Stack spacing={2}>
<LoadingBackdrop open={isLoading} />
<Typography variant="h4">Legal Contracts Creator</Typography>
<Typography variant="h4">Legal Form Creator</Typography>
<Typography>Generate forms for data collection from existing contracts:</Typography>
<Typography variant="body1">
Code at <code>docs/src/app/examples/generation/legal/page.tsx</code>
Expand Down

0 comments on commit 27f0d18

Please sign in to comment.