mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-04 02:01:58 -05:00
Updated static users setting group in AdminX
refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
parent
65c288584d
commit
48fa7bb0ca
2 changed files with 34 additions and 10 deletions
|
@ -22,3 +22,10 @@ export const Default: Story = {
|
||||||
tabs: tabs
|
tabs: tabs
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const DefaultSelected: Story = {
|
||||||
|
args: {
|
||||||
|
tabs: tabs,
|
||||||
|
defaultSelected: 'tab-2'
|
||||||
|
}
|
||||||
|
};
|
|
@ -3,6 +3,7 @@ import List from '../../../admin-x-ds/global/List';
|
||||||
import ListItem from '../../../admin-x-ds/global/ListItem';
|
import ListItem from '../../../admin-x-ds/global/ListItem';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
|
import SettingGroup from '../../../admin-x-ds/settings/SettingGroup';
|
||||||
|
import TabView from '../../../admin-x-ds/global/TabView';
|
||||||
|
|
||||||
const Users: React.FC = () => {
|
const Users: React.FC = () => {
|
||||||
const buttons = (
|
const buttons = (
|
||||||
|
@ -11,35 +12,51 @@ const Users: React.FC = () => {
|
||||||
|
|
||||||
const owner = (
|
const owner = (
|
||||||
<div className='flex flex-col'>
|
<div className='flex flex-col'>
|
||||||
<span className='text-sm'>Cristofer Vaccaro — <strong>Owner</strong></span>
|
<span>Cristofer Vaccaro — <strong>Owner</strong></span>
|
||||||
<span className='text-xs text-grey-700'>cristofer@example.com</span>
|
<span className='text-xs text-grey-700'>cristofer@example.com</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const list = (
|
const admins = (
|
||||||
<List title='Users'>
|
<List>
|
||||||
<ListItem
|
<ListItem
|
||||||
action={<Button color='green' label='Edit' link={true} />}
|
action={<Button color='green' label='Edit' link={true} />}
|
||||||
detail='alena@press.com'
|
detail='alena@press.com'
|
||||||
hideActions={true}
|
hideActions={true}
|
||||||
id='list-item-1'
|
id='list-item-1'
|
||||||
title='Alena Press' />
|
title='Alena Press' />
|
||||||
<ListItem
|
|
||||||
action={<Button color='green' label='Edit' link={true} />}
|
|
||||||
detail='martin@culhane.com'
|
|
||||||
hideActions={true}
|
|
||||||
id='list-item-1'
|
|
||||||
title='Martin Culhane' />
|
|
||||||
</List>
|
</List>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const editors = (
|
||||||
|
<List>
|
||||||
|
<ListItem
|
||||||
|
action={<Button color='green' label='Edit' link={true} />}
|
||||||
|
detail='lydia@siphron.com'
|
||||||
|
hideActions={true}
|
||||||
|
id='list-item-1'
|
||||||
|
title='Lydia Siphron' />
|
||||||
|
<ListItem
|
||||||
|
action={<Button color='green' label='Edit' link={true} />}
|
||||||
|
detail='james@korsgaard.com'
|
||||||
|
hideActions={true}
|
||||||
|
id='list-item-1'
|
||||||
|
title='James Korsgaard' />
|
||||||
|
</List>
|
||||||
|
);
|
||||||
|
|
||||||
|
const tabs = [
|
||||||
|
{id: 'users-admins', title: 'Administrators', contents: admins},
|
||||||
|
{id: 'users-editors', title: 'Editors', contents: editors}
|
||||||
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SettingGroup
|
<SettingGroup
|
||||||
customButtons={buttons}
|
customButtons={buttons}
|
||||||
title='Users and permissions'
|
title='Users and permissions'
|
||||||
>
|
>
|
||||||
{owner}
|
{owner}
|
||||||
{list}
|
<TabView tabs={tabs} />
|
||||||
</SettingGroup>
|
</SettingGroup>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue