forked from github/plane
chore: revert issue modal select designs
This commit is contained in:
parent
dc908d21bb
commit
9ef30b4fbf
@ -19,20 +19,22 @@ export const IssueDateSelect: React.FC<Props> = ({ label, maxDate, minDate, onCh
|
||||
<Popover className="relative flex items-center justify-center rounded-lg">
|
||||
{({ close }) => (
|
||||
<>
|
||||
<Popover.Button className="flex items-center gap-1 rounded text-xs bg-custom-background-80 px-2.5 py-0.5">
|
||||
{value ? (
|
||||
<>
|
||||
<span className="text-custom-text-100">{renderShortDateWithYearFormat(value)}</span>
|
||||
<button onClick={() => onChange(null)}>
|
||||
<XMarkIcon className="h-3 w-3" />
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<CalendarDaysIcon className="h-3.5 w-3.5 flex-shrink-0" />
|
||||
<span>{label}</span>
|
||||
</>
|
||||
)}
|
||||
<Popover.Button className="flex cursor-pointer items-center rounded-md border border-custom-border-200 text-xs shadow-sm duration-200">
|
||||
<span className="flex items-center justify-center gap-2 px-2 py-1 text-xs text-custom-text-200 hover:bg-custom-background-80">
|
||||
{value ? (
|
||||
<>
|
||||
<span className="text-custom-text-100">{renderShortDateWithYearFormat(value)}</span>
|
||||
<button onClick={() => onChange(null)}>
|
||||
<XMarkIcon className="h-3 w-3" />
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<CalendarDaysIcon className="h-3.5 w-3.5 flex-shrink-0" />
|
||||
<span>{label}</span>
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
</Popover.Button>
|
||||
|
||||
<Transition
|
||||
|
@ -69,9 +69,9 @@ export const IssueLabelSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<span className="flex items-center justify-center gap-2 px-2.5 py-0.5 text-xs rounded bg-custom-background-80">
|
||||
<TagIcon className="h-3.5 w-3.5" />
|
||||
<span>Label</span>
|
||||
<span className="flex items-center justify-center gap-2 px-2 py-1 text-xs rounded shadow-sm border border-custom-border-300 hover:bg-custom-background-80">
|
||||
<TagIcon className="h-3.5 w-3.5 text-custom-text-200" />
|
||||
<span className=" text-custom-text-200">Label</span>
|
||||
</span>
|
||||
)}
|
||||
</Combobox.Button>
|
||||
|
@ -17,11 +17,8 @@ type Props = {
|
||||
export const IssuePrioritySelect: React.FC<Props> = ({ value, onChange }) => (
|
||||
<CustomSelect
|
||||
value={value}
|
||||
customButton={
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center justify-center gap-2 text-xs bg-custom-background-80 rounded px-2.5 py-0.5"
|
||||
>
|
||||
label={
|
||||
<div className="flex items-center justify-center gap-2 text-xs">
|
||||
<span className="flex items-center">
|
||||
<PriorityIcon
|
||||
priority={value}
|
||||
@ -31,7 +28,7 @@ export const IssuePrioritySelect: React.FC<Props> = ({ value, onChange }) => (
|
||||
<span className={`${value ? "" : "text-custom-text-200"} capitalize`}>
|
||||
{value ?? "Priority"}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
onChange={onChange}
|
||||
noChevron
|
||||
|
@ -55,11 +55,8 @@ export const IssueStateSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
customButton={
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center gap-2 bg-custom-background-80 rounded text-xs px-2.5 py-0.5"
|
||||
>
|
||||
label={
|
||||
<div className="flex items-center gap-2">
|
||||
{selectedOption ? (
|
||||
<StateGroupIcon stateGroup={selectedOption.group} color={selectedOption.color} />
|
||||
) : currentDefaultState ? (
|
||||
@ -73,7 +70,7 @@ export const IssueStateSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
||||
{selectedOption?.name
|
||||
? selectedOption.name
|
||||
: currentDefaultState?.name ?? <span className="text-custom-text-200">State</span>}
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
footerOption={
|
||||
<button
|
||||
|
Loading…
Reference in New Issue
Block a user