mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
chore: remove antd input (#18771)
This commit is contained in:
parent
b2a1dfd3fd
commit
c6e04911d3
@ -45,9 +45,15 @@
|
||||
line-height: 1.25rem;
|
||||
align-items: center;
|
||||
|
||||
input {
|
||||
.LemonInput {
|
||||
width: 3rem;
|
||||
text-align: center;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
|
||||
input {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.RollingDateRangeFilter__counter__step {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Input } from 'antd'
|
||||
import { DateOption, rollingDateRangeFilterLogic } from './rollingDateRangeFilterLogic'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { LemonButton, LemonSelect, LemonSelectOptions } from '@posthog/lemon-ui'
|
||||
import { LemonButton, LemonInput, LemonSelect, LemonSelectOptions } from '@posthog/lemon-ui'
|
||||
import { Tooltip } from 'lib/lemon-ui/Tooltip'
|
||||
import { dayjs } from 'lib/dayjs'
|
||||
import clsx from 'clsx'
|
||||
@ -38,11 +37,6 @@ export function RollingDateRangeFilter({
|
||||
useActions(rollingDateRangeFilterLogic(logicProps))
|
||||
const { counter, dateOption, formattedDate } = useValues(rollingDateRangeFilterLogic(logicProps))
|
||||
|
||||
const onInputChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
||||
const newValue = event.target.value ? parseFloat(event.target.value) : undefined
|
||||
setCounter(newValue)
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip title={makeLabel ? makeLabel(formattedDate) : undefined}>
|
||||
<LemonButton
|
||||
@ -61,14 +55,13 @@ export function RollingDateRangeFilter({
|
||||
>
|
||||
-
|
||||
</span>
|
||||
<Input
|
||||
<LemonInput
|
||||
data-attr="rolling-date-range-input"
|
||||
type="number"
|
||||
value={counter ?? ''}
|
||||
min="0"
|
||||
value={counter ?? 0}
|
||||
min={0}
|
||||
placeholder="0"
|
||||
onChange={onInputChange}
|
||||
bordered={false}
|
||||
onChange={(value) => setCounter(value)}
|
||||
/>
|
||||
<span
|
||||
className="RollingDateRangeFilter__counter__step"
|
||||
|
Loading…
Reference in New Issue
Block a user