mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Added static form to mailgun settings
refs. https://github.com/TryGhost/Team/issues/3151
This commit is contained in:
parent
2cbae2ec6d
commit
eee65f82d5
@ -0,0 +1,18 @@
|
|||||||
|
import type {Meta, StoryObj} from '@storybook/react';
|
||||||
|
|
||||||
|
import Hint from './Hint';
|
||||||
|
|
||||||
|
const meta = {
|
||||||
|
title: 'Global / Hint',
|
||||||
|
component: Hint,
|
||||||
|
tags: ['autodocs']
|
||||||
|
} satisfies Meta<typeof Hint>;
|
||||||
|
|
||||||
|
export default meta;
|
||||||
|
type Story = StoryObj<typeof Hint>;
|
||||||
|
|
||||||
|
export const Default: Story = {
|
||||||
|
args: {
|
||||||
|
children: 'This is a hint'
|
||||||
|
}
|
||||||
|
};
|
@ -18,7 +18,7 @@ const Hint: React.FC<HintProps> = ({children, color, ...props}) => {
|
|||||||
|
|
||||||
if (React.isValidElement(children)) {
|
if (React.isValidElement(children)) {
|
||||||
return (
|
return (
|
||||||
<>{children}</>
|
<span className={`mt-2 inline-block text-xs ${color ? `text-${color}` : `text-grey-700`}`} {...props}>{children}</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
import Dropdown from '../../../admin-x-ds/global/Dropdown';
|
||||||
import Link from '../../../admin-x-ds/global/Link';
|
import Link from '../../../admin-x-ds/global/Link';
|
||||||
import React, {useState} from 'react';
|
import React, {useState} from 'react';
|
||||||
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
|
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
|
||||||
import SettingGroupContent from '../../../admin-x-ds/settings/SettingGroupContent';
|
import SettingGroupContent from '../../../admin-x-ds/settings/SettingGroupContent';
|
||||||
|
import TextField from '../../../admin-x-ds/global/TextField';
|
||||||
import {TSettingGroupStates} from '../../../admin-x-ds/settings/SettingGroup';
|
import {TSettingGroupStates} from '../../../admin-x-ds/settings/SettingGroup';
|
||||||
|
|
||||||
const MailGun: React.FC = () => {
|
const MailGun: React.FC = () => {
|
||||||
@ -26,7 +28,26 @@ const MailGun: React.FC = () => {
|
|||||||
|
|
||||||
const inputs = (
|
const inputs = (
|
||||||
<SettingGroupContent>
|
<SettingGroupContent>
|
||||||
|
<div className='grid grid-cols-2 gap-6'>
|
||||||
|
<Dropdown
|
||||||
|
defaultSelectedOption='option-1'
|
||||||
|
options={[
|
||||||
|
{value: 'option-1', label: 'US'},
|
||||||
|
{value: 'option-2', label: 'EU'}
|
||||||
|
]}
|
||||||
|
title="Mailgun region"
|
||||||
|
onSelect={() => {}}
|
||||||
|
/>
|
||||||
|
<TextField
|
||||||
|
title='Mailgun domain'
|
||||||
|
/>
|
||||||
|
<div className='col-span-2'>
|
||||||
|
<TextField
|
||||||
|
hint={<>Find your Mailgun API keys<Link href="https://app.mailgun.com/app/account/security/api_keys" target="_blank">here</Link></>}
|
||||||
|
title='Mailgun private API key'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</SettingGroupContent>
|
</SettingGroupContent>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user