Switched checkbox to a hint showing status
refs PROD-276
This commit is contained in:
parent
b0ac1e9afd
commit
69a8f71bd1
@ -3,7 +3,7 @@ import React, {useEffect, useRef} from 'react';
|
|||||||
import TierDetailPreview from './TierDetailPreview';
|
import TierDetailPreview from './TierDetailPreview';
|
||||||
import useFeatureFlag from '../../../../hooks/useFeatureFlag';
|
import useFeatureFlag from '../../../../hooks/useFeatureFlag';
|
||||||
import useSettingGroup from '../../../../hooks/useSettingGroup';
|
import useSettingGroup from '../../../../hooks/useSettingGroup';
|
||||||
import {Button, ButtonProps, Checkbox, ConfirmationModal, CurrencyField, Form, Heading, Icon, Modal, Select, SortableList, TextField, Toggle, URLTextField, showToast, useSortableIndexedList} from '@tryghost/admin-x-design-system';
|
import {Button, ButtonProps, ConfirmationModal, CurrencyField, Form, Heading, Hint, Icon, Modal, Select, SortableList, TextField, Toggle, URLTextField, showToast, useSortableIndexedList} from '@tryghost/admin-x-design-system';
|
||||||
import {ErrorMessages, useForm, useHandleError} from '@tryghost/admin-x-framework/hooks';
|
import {ErrorMessages, useForm, useHandleError} from '@tryghost/admin-x-framework/hooks';
|
||||||
import {RoutingModalProps, useRouting} from '@tryghost/admin-x-framework/routing';
|
import {RoutingModalProps, useRouting} from '@tryghost/admin-x-framework/routing';
|
||||||
import {Tier, useAddTier, useBrowseTiers, useEditTier} from '@tryghost/admin-x-framework/api/tiers';
|
import {Tier, useAddTier, useBrowseTiers, useEditTier} from '@tryghost/admin-x-framework/api/tiers';
|
||||||
@ -364,15 +364,12 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
<TierDetailPreview isFreeTier={isFreeTier} tier={formState} />
|
<TierDetailPreview isFreeTier={isFreeTier} tier={formState} />
|
||||||
|
|
||||||
{hasPortalImprovements &&
|
{hasPortalImprovements &&
|
||||||
<Form className=' mt-3' gap='none'>
|
<Form className=' mt-0' gap='none'>
|
||||||
<Checkbox
|
<Hint className=''>
|
||||||
checked={formState.visibility === 'public'}
|
<p className='inline-block'>{(formState.visibility === 'public') ? 'Visible' : 'Not visible'} at signup. You can change this in {tier ? <Button className='text-xs font-normal' color='green' label='Portal settings' link onClick={() => {
|
||||||
hint='You can always change this in portal settings' label='Show tier in portal for new signups'
|
updateRoute('portal/edit');
|
||||||
value='fakeShow'
|
}}/> : <span className='font-semibold'>Portal settings</span>}.</p>
|
||||||
onChange={(checked) => {
|
</Hint>
|
||||||
updateForm(state => ({...state, visibility: checked ? 'public' : 'none'}));
|
|
||||||
}}
|
|
||||||
></Checkbox>
|
|
||||||
</Form>
|
</Form>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user