forked from github/plane
fix: inconsistency in styles (#734)
This commit is contained in:
parent
3947a86fa7
commit
9b1ae6bcd4
@ -184,8 +184,7 @@ export const EstimatePointsModal: React.FC<Props> = ({ isOpen, data, estimate, o
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data) return;
|
if(!data) return
|
||||||
|
|
||||||
reset({
|
reset({
|
||||||
...defaultValues,
|
...defaultValues,
|
||||||
...data,
|
...data,
|
||||||
|
@ -83,7 +83,7 @@ export const SingleEstimate: React.FC<Props> = ({
|
|||||||
estimate={estimate}
|
estimate={estimate}
|
||||||
onClose={() => setIsEstimatePointsModalOpen(false)}
|
onClose={() => setIsEstimatePointsModalOpen(false)}
|
||||||
/>
|
/>
|
||||||
<div className="gap-2 space-y-3 bg-white">
|
<div className="gap-2 space-y-3 my-3 bg-white">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<div className="items-start">
|
<div className="items-start">
|
||||||
<h6 className="font-medium text-base w-[40vw] truncate">{estimate.name}</h6>
|
<h6 className="font-medium text-base w-[40vw] truncate">{estimate.name}</h6>
|
||||||
@ -129,7 +129,7 @@ export const SingleEstimate: React.FC<Props> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{estimatePoints && estimatePoints.length > 0 ? (
|
{estimatePoints && estimatePoints.length > 0 ? (
|
||||||
<div className="flex gap-2 mt-2">
|
<div className="flex gap-2">
|
||||||
{estimatePoints.length > 0 && "Estimate points ("}
|
{estimatePoints.length > 0 && "Estimate points ("}
|
||||||
{estimatePoints.map((point, i) => (
|
{estimatePoints.map((point, i) => (
|
||||||
<h6 key={point.id}>
|
<h6 key={point.id}>
|
||||||
|
@ -405,7 +405,7 @@ export const IssueForm: FC<IssueFormProps> = ({
|
|||||||
control={control}
|
control={control}
|
||||||
name="estimate_point"
|
name="estimate_point"
|
||||||
render={({ field: { value, onChange } }) => (
|
render={({ field: { value, onChange } }) => (
|
||||||
<IssueEstimateSelect value={value} onChange={onChange} />
|
<IssueEstimateSelect chevron={false} value={value} onChange={onChange} />
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,15 +10,17 @@ import estimatesService from "services/estimates.service";
|
|||||||
// ui
|
// ui
|
||||||
import { CustomSelect } from "components/ui";
|
import { CustomSelect } from "components/ui";
|
||||||
// icons
|
// icons
|
||||||
|
import { PlayIcon, ChevronDownIcon } from "@heroicons/react/24/outline";
|
||||||
// fetch-keys
|
// fetch-keys
|
||||||
import { ESTIMATE_POINTS_LIST, PROJECT_DETAILS } from "constants/fetch-keys";
|
import { ESTIMATE_POINTS_LIST, PROJECT_DETAILS } from "constants/fetch-keys";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
value: number;
|
value: number;
|
||||||
onChange: (value: number) => void;
|
onChange: (value: number) => void;
|
||||||
|
chevron: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueEstimateSelect: React.FC<Props> = ({ value, onChange }) => {
|
export const IssueEstimateSelect: React.FC<Props> = ({ value, onChange, chevron }) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug, projectId } = router.query;
|
const { workspaceSlug, projectId } = router.query;
|
||||||
|
|
||||||
@ -47,20 +49,34 @@ export const IssueEstimateSelect: React.FC<Props> = ({ value, onChange }) => {
|
|||||||
<CustomSelect
|
<CustomSelect
|
||||||
value={value}
|
value={value}
|
||||||
label={
|
label={
|
||||||
<div className="flex items-center gap-2 text-xs w-[111px]">
|
<div className="flex items-center gap-2 text-xs min-w-[calc(100%+10px)]">
|
||||||
|
<span>
|
||||||
|
<PlayIcon className="h-4 w-4 text-gray-700 -rotate-90" />
|
||||||
|
</span>
|
||||||
<span className={`${value ? "text-gray-600" : "text-gray-500"}`}>
|
<span className={`${value ? "text-gray-600" : "text-gray-500"}`}>
|
||||||
{estimatePoints?.find((e) => e.key === value)?.value ?? "Estimate points"}
|
{estimatePoints?.find((e) => e.key === value)?.value ?? "Estimate points"}
|
||||||
</span>
|
</span>
|
||||||
|
{chevron && (
|
||||||
|
<span className="w-full flex justify-end pr-3">
|
||||||
|
<ChevronDownIcon className="h-[9px] w-[9px] text-black" />
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
position="right"
|
position="right"
|
||||||
width="w-full"
|
width="w-full min-w-[111px]"
|
||||||
|
noChevron={!chevron}
|
||||||
>
|
>
|
||||||
{estimatePoints &&
|
{estimatePoints &&
|
||||||
estimatePoints.map((point) => (
|
estimatePoints.map((point) => (
|
||||||
<CustomSelect.Option className="w-full" key={point.key} value={point.key}>
|
<CustomSelect.Option className="w-full " key={point.key} value={point.key}>
|
||||||
{point.value}
|
<>
|
||||||
|
<span>
|
||||||
|
<PlayIcon className="h-4 w-4 -rotate-90" />
|
||||||
|
</span>
|
||||||
|
{point.value}
|
||||||
|
</>
|
||||||
</CustomSelect.Option>
|
</CustomSelect.Option>
|
||||||
))}
|
))}
|
||||||
</CustomSelect>
|
</CustomSelect>
|
||||||
|
@ -28,7 +28,7 @@ export const SidebarEstimateSelect: React.FC<Props> = ({ value, onChange, userAu
|
|||||||
<p>Estimate</p>
|
<p>Estimate</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="sm:basis-1/2">
|
<div className="sm:basis-1/2">
|
||||||
<IssueEstimateSelect value={value} onChange={onChange} />
|
<IssueEstimateSelect chevron={true} value={value} onChange={onChange} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -124,7 +124,7 @@ const EstimatesSettings: NextPage = () => {
|
|||||||
</section>
|
</section>
|
||||||
<hr className="h-[1px] w-full mt-4" />
|
<hr className="h-[1px] w-full mt-4" />
|
||||||
{estimatesList && estimatesList.length > 0 && (
|
{estimatesList && estimatesList.length > 0 && (
|
||||||
<section className="mt-4 divide-y px-6 py-4 mb-8 rounded-xl border bg-white">
|
<section className="mt-4 divide-y px-6 mb-8 rounded-xl border bg-white">
|
||||||
<>
|
<>
|
||||||
{estimatesList ? (
|
{estimatesList ? (
|
||||||
estimatesList.map((estimate) => (
|
estimatesList.map((estimate) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user