Refinements in Admin X DS

refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
Peter Zimon 2023-05-17 19:01:01 +02:00
parent b2cf7704d5
commit f0ef0cd54f
4 changed files with 9 additions and 3 deletions

View File

@ -12,10 +12,15 @@ const preview: Preview = {
date: /Date$/,
},
},
options: {
storySort: {
order: ['Global', 'Settings', 'Experimental'],
},
},
},
decorators: [
(Story) => (
<div className="admin-x-settings" style={{padding: '24px'}}>
<div className="admin-x-settings" style={{ padding: '24px' }}>
{/* 👇 Decorators in Storybook also accept a function. Replace <Story/> with Story() to enable it */}
<Story />
</div>

View File

@ -28,7 +28,7 @@ const Dropdown: React.FC<DropdownProps> = ({title, options, onSelect, error, hin
return (
<div className='flex flex-col'>
{title && <Heading grey={true} useLabelTag={true}>{title}</Heading>}
<select className={`-m-1 h-10 border-b ${error ? `border-red` : `border-grey-300 focus:border-grey-900`} py-2 ${title && `mt-0`}`} value={selectedOption} onChange={handleOptionChange}>
<select className={`-m-1 h-10 border-b ${error ? `border-red` : `border-grey-300 hover:border-grey-500 focus:border-grey-900`} py-2 ${title && `mt-0`}`} value={selectedOption} onChange={handleOptionChange}>
<option value="">Select an option</option>
{options.map(option => (
<option

View File

@ -19,7 +19,7 @@ const TextField: React.FC<ITextField> = ({inputRef, title, value, error, placeho
{title && <Heading grey={true} useLabelTag={true}>{title}</Heading>}
<input
ref={inputRef}
className={`-m-1 h-10 border-b ${error ? `border-red` : `border-grey-300 focus:border-grey-900`} px-1 py-2 ${title && `mt-0`}`}
className={`-m-1 h-10 border-b ${error ? `border-red` : `border-grey-300 hover:border-grey-500 focus:border-grey-900`} px-1 py-2 ${title && `mt-0`}`}
placeholder={placeholder}
type='text'
value={value}

View File

@ -60,4 +60,5 @@
html, body, #root {
width: 100%;
height: 100%;
margin: 0;
}