Skip to content

Commit

Permalink
feat: improve readability of card options
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Oct 9, 2024
1 parent a31d025 commit 69d9b3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/components/TemplateSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ interface TemplateSelectPicker {
values: SelectOption[];
name: string;
value: string;
className?: string;
}

function TemplateSelect({
name,
value,
pickedTemplate,
values,
}: TemplateSelectPicker) {
name,
value,
pickedTemplate,
values,
className
}: TemplateSelectPicker) {
return (
<div className="field">
<div className={`${className || ''} field`}>
<div className="control">
<div className="select">
<select
Expand Down
8 changes: 5 additions & 3 deletions src/components/modals/SettingsModal/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function SettingsModal({
</p>
<div className="control">
<StyledInput
className="input"
className="input mb-0 mt-2"
placeholder="Enter deck name (optional)"
value={deckName}
onChange={(
Expand All @@ -195,13 +195,14 @@ function SettingsModal({
}}
/>
</div>
<div className="control">
<div className="control my-4">
<strong>Page icon</strong>
<p className="is-size-7">
By default the icon is the Notion page icon. You can
disable this for example when sorting gets messed up.
</p>
<TemplateSelect
className="mb-4 mt-2"
values={[
{ label: 'Icon first', value: 'first_emoji' },
{
Expand Down Expand Up @@ -230,6 +231,7 @@ function SettingsModal({
them so you can open them manually when you want in Anki.
</p>
<TemplateSelect
className="mb-4 mt-2"
values={[
{ label: 'Open nested toggles', value: 'open_toggle' },
{
Expand Down Expand Up @@ -257,7 +259,7 @@ function SettingsModal({
}}
/>)}
</div>
<h2 className="title is-4">Template Options</h2>
<h2 className="title is-4 mb-0 py-4">Template Options</h2>
<TemplateSelect
values={availableTemplates}
value={template}
Expand Down

0 comments on commit 69d9b3d

Please sign in to comment.