File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed
redisinsight/ui/src/components/base/inputs Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 11import React , { ComponentProps } from 'react'
2-
32import { NumericInput as RedisNumericInput } from '@redis-ui/components'
3+ import { InputAppend } from './numeric-input.styles'
44
5- export type RedisNumericInputProps = ComponentProps < typeof RedisNumericInput >
5+ export type RedisNumericInputProps = ComponentProps <
6+ typeof RedisNumericInput
7+ > & {
8+ append ?: React . ReactNode
9+ }
610
7- export default function NumericInput ( props : RedisNumericInputProps ) {
8- return < RedisNumericInput { ...props } />
11+ export default function NumericInput ( {
12+ append,
13+ ...props
14+ } : RedisNumericInputProps ) {
15+ return append ? (
16+ < InputAppend >
17+ < RedisNumericInput { ...props } />
18+ { append }
19+ </ InputAppend >
20+ ) : (
21+ < RedisNumericInput { ...props } />
22+ )
923}
Original file line number Diff line number Diff line change 1+ // styles.scss.ts
2+ import styled from 'styled-components'
3+
4+ export const InputAppend = styled . div `
5+ display: flex;
6+ align-items: center;
7+ align-content: center;
8+ gap: 130px;
9+ padding-left: 10px;
10+ padding-bottom: 3px;
11+ `
You can’t perform that action at this time.
0 commit comments