0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Updated unstyled option to select input in AdminX

refs. https://github.com/TryGhost/Team/issues/3354
This commit is contained in:
Peter Zimon 2023-06-07 23:39:53 +02:00
parent f28829b24e
commit 859e052810

View file

@ -84,8 +84,8 @@ const Select: React.FC<SelectProps> = ({
const optionClasses = optionClassName;
return (
<div>
const select = (
<>
{title && <Heading grey={selectedOption || !prompt ? true : false} htmlFor={id} useLabelTag={true}>{title}</Heading>}
<div className={containerClasses}>
<select className={selectClasses} id={id} value={selectedOption} onChange={handleOptionChange}>
@ -102,7 +102,14 @@ const Select: React.FC<SelectProps> = ({
</select>
</div>
{hint && <Hint color={error ? 'red' : ''}>{hint}</Hint>}
</div>
</>
);
return (
unstyled ? select :
<div>
{select}
</div>
);
};