From 31ae1da84e69bb13bd4db10fbee4ce3a95a3eb97 Mon Sep 17 00:00:00 2001 From: Dominik Dorfmeister Date: Thu, 6 Mar 2025 14:56:54 +0100 Subject: [PATCH] ref: move numberInput to core (#86472) --- static/app/components/{ => core/input}/numberInput.spec.tsx | 2 +- static/app/components/{ => core/input}/numberInput.tsx | 4 +--- static/app/views/alerts/rules/issue/ruleNode.tsx | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename static/app/components/{ => core/input}/numberInput.spec.tsx (96%) rename static/app/components/{ => core/input}/numberInput.tsx (97%) diff --git a/static/app/components/numberInput.spec.tsx b/static/app/components/core/input/numberInput.spec.tsx similarity index 96% rename from static/app/components/numberInput.spec.tsx rename to static/app/components/core/input/numberInput.spec.tsx index 66287b14615cb3..375343bd47e45b 100644 --- a/static/app/components/numberInput.spec.tsx +++ b/static/app/components/core/input/numberInput.spec.tsx @@ -1,6 +1,6 @@ import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary'; -import NumberInput from 'sentry/components/numberInput'; +import {NumberInput} from 'sentry/components/core/input/numberInput'; describe('NumberInput', function () { it('renders input', function () { diff --git a/static/app/components/numberInput.tsx b/static/app/components/core/input/numberInput.tsx similarity index 97% rename from static/app/components/numberInput.tsx rename to static/app/components/core/input/numberInput.tsx index c831cdb30c5bde..cfecbcb9e4a8d3 100644 --- a/static/app/components/numberInput.tsx +++ b/static/app/components/core/input/numberInput.tsx @@ -91,9 +91,7 @@ function BaseNumberInput( ); } -const NumberInput = forwardRef(BaseNumberInput); - -export default NumberInput; +export const NumberInput = forwardRef(BaseNumberInput); const StepWrap = styled('div')<{size?: FormSize}>` display: flex; diff --git a/static/app/views/alerts/rules/issue/ruleNode.tsx b/static/app/views/alerts/rules/issue/ruleNode.tsx index 6a50c2a0dbcaac..84b55a8e9303b6 100644 --- a/static/app/views/alerts/rules/issue/ruleNode.tsx +++ b/static/app/views/alerts/rules/issue/ruleNode.tsx @@ -6,9 +6,9 @@ import {openModal} from 'sentry/actionCreators/modal'; import {Button, LinkButton} from 'sentry/components/button'; import {Alert} from 'sentry/components/core/alert'; import {Input} from 'sentry/components/core/input'; +import {NumberInput} from 'sentry/components/core/input/numberInput'; import SelectControl from 'sentry/components/forms/controls/selectControl'; import ExternalLink from 'sentry/components/links/externalLink'; -import NumberInput from 'sentry/components/numberInput'; import {releaseHealth} from 'sentry/data/platformCategories'; import {IconDelete, IconSettings} from 'sentry/icons'; import {t, tct} from 'sentry/locale';