-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle summary and banner step for announce candidacy
- Loading branch information
1 parent
ef2b0dd
commit 608c9c3
Showing
5 changed files
with
119 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/ui/src/council/modals/AnnounceCandidacy/components/SummaryAndBannerStep.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react' | ||
|
||
import { CKEditor } from '@/common/components/CKEditor' | ||
import { InputComponent, InputText } from '@/common/components/forms' | ||
import { Row } from '@/common/components/Modal' | ||
import { RowGapBlock } from '@/common/components/page/PageContent' | ||
|
||
interface SummaryAndBannerStepProps { | ||
summary?: string | ||
banner?: string | ||
setSummary: (summary?: string) => void | ||
setBanner: (banner?: string) => void | ||
} | ||
|
||
export const SummaryAndBannerStep = ({ summary, banner, setSummary, setBanner }: SummaryAndBannerStepProps) => { | ||
return ( | ||
<RowGapBlock gap={24}> | ||
<Row> | ||
<RowGapBlock gap={8}> | ||
<h4>Candidate profile</h4> | ||
</RowGapBlock> | ||
</Row> | ||
<Row> | ||
<RowGapBlock gap={20}> | ||
<InputComponent label="Summary" required inputSize="auto" id="field-summary"> | ||
<CKEditor | ||
id="field-summary" | ||
onChange={(event, editor) => setSummary(editor.getData())} | ||
onReady={(editor) => editor.setData(summary || '')} | ||
/> | ||
</InputComponent> | ||
<InputComponent label="Banner" disabled inputSize="s"> | ||
<InputText | ||
disabled | ||
placeholder="Image URL" | ||
value={banner} | ||
onChange={(event) => setBanner(event.target.value)} | ||
/> | ||
</InputComponent> | ||
</RowGapBlock> | ||
</Row> | ||
</RowGapBlock> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters